1

I'm using ImageMagick along with paperclip to upload images in a RoR application. The problem is that the command 'identify' is causing trouble. My app throws the following error "Image Paperclip::Errors::NotIdentifiedByImageMagickError". Looking deep into the logger, I found:

Command :: identify -format '%wx%h,%[exif:orientation]' "C:/Users/<...>" 2>NUL
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>
Command :: identify -format '%wx%h,%[exif:orientation]' "C:/Users/<...>" 2>NUL
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>

And then I tried to wirte the problematic commad into my cmd and it throws

identify: unknown image property "%[exif:orientation]" @ warning/property.c/InterpretImageProperties/3904

I'm using Windows and I have installed ImageMagick 7.0.7 with legacy options.

The problem isn't that I don't know how to get the orientation. The problem is that when I upload an image and try to create the 'profiles'

  has_attached_file :image,
                styles: { thumb: ["64x64#", :jpg],
                          original: ['500x500>', :jpg] },
                convert_options: { thumb: "-quality 75 -strip",
                                   original: "-quality 85 -strip" }

Paperclip makes an automatic call to that command to get the orientation and my console does not seem to recognize that command.

fmw42
  • 46,825
  • 10
  • 62
  • 80
Josemafuen
  • 682
  • 2
  • 16
  • 41
  • 1
    Possible duplicate of [ImageMagick: how to determine orientation of jpeg file?](https://stackoverflow.com/questions/9371273/imagemagick-how-to-determine-orientation-of-jpeg-file) – Mayur Shah Feb 27 '18 at 14:20
  • 1
    Paperclip probably expects to use Imamagick 6 identify. But in Imagemagick 7, that would need to be magick identify. So you may need to back down to Imagemagick 6. – fmw42 Feb 27 '18 at 17:10
  • That's the correct answer, please, copy it as an answer so I can mark it as correct – Josemafuen Feb 28 '18 at 11:06
  • I have Lubuntu 20_04 and `ImageMagick 6.9.10-23 Q16 x86_64 20190101`. `Identify` is not found as command, `convert` works. – Timo Aug 16 '20 at 07:20

0 Answers0