Page 1 of 1

crop CR2 file

Posted: 2010-11-26T04:59:01-07:00
by tg-timoo
Hey,

I am trying to crop a CR2 image file. I do not get any error message, but the cropping does not work. Here my code:

mogrify -crop 10x10+10+10 file.CR2
or
mogrify -crop 10x10+10+10 cr2:file.CR2 (with implicit file extension)

Has anyone got an idea why this does not work? I could not find any hints from the image magick documentation if CR2 file modification is maybe limited....

Thanks
Timo

Re: crop CR2 file

Posted: 2010-11-26T08:46:24-07:00
by Bonzo
Are you just cropping the one image at a time; if so try convert:

Code: Select all

convert file.CR2 -crop 10x10+10+10 output.jpg
Does your setup support CR2 files; try a simple convert from CR2 to jpg

Code: Select all

convert file.CR2 output.jpg
What version are you using?

Re: crop CR2 file

Posted: 2010-11-27T03:18:39-07:00
by tg-timoo
Dear Bonzo,

thank you for your reply! I am using ImageMagick 6.6.2-6!

In general working with CR2 files seem not to be a problem, also conversion to JPG works fine. Converting and then cropping, however, does not apply to my problem, as I need the cropped version of the RAW image file (meaning the CR2 file).

This approach might sound strange, so here the reason for this approach: I am creating an image database with a rather large number of RAW, Jpg and Tiff images with specific exif header and file properties. For testing purposes, I am creating a dummy database that consists of the same file structure and the same image files in a cropped version (1x1 pixel). By that, the size of the database is drastically reduced, but the image properties are still maintained. And here comes to point: I fail in cropping the CR2 file....

If anyone has a suggestion, I would appreciate your help!
Cheers Timo

Re: crop CR2 file

Posted: 2010-11-27T04:10:57-07:00
by Bonzo
I can not get the crop to work in mogrify either; I tried two methods:

Code: Select all

mogrify -crop 10x10+10+10 -format png *.CR2

mogrify -crop 10x10+10+10 *.CR2
I can get it to work OK with convert and I am using 6.5.9-5
It would be possible to write some code to read the images and use convert instead.

I would report it as a bug in the bug section.