1

I'm working with scrimage right now, and I need to get the image format from the file, as right now, if a GIF is uploaded, it will not become an animated JPEG. I need to be able to tell if the image file is a GIF so I know to not use the Format.JPEG writer. Is there any way to do this?

Wiz
  • 4,595
  • 9
  • 34
  • 51

1 Answers1

1

In release 2.0.0-M2 you can do

val format : Option[Format] = FormatDetector.detect(in)

where in is an input stream.

sksamuel
  • 16,154
  • 8
  • 60
  • 108