Page 1 of 1

cr2 to png problem

Posted: 2010-02-11T18:37:37-07:00
by naphelge
hi,

i will mention right off the bat i am no photo guru. i have about 120 cr2 (canon raw format) photos i would like to convert to png files.

i am using ubuntu and the command line using convert, which once i get the results i am looking for i think i should be able to batch convert using the same command with mogrify.

my problem is the original file sizes are around 15-18 megs each. i run... $ convert IMG_0735_01.CR2 image735.png
and i end up with a png file that is like 60 megs. i have tried using -quality and -depth options to reduce the size but no matter what the file converts to the same ballooned 60 megs.

when i use gthumb and convert the cr2 to png the resulting png file is the same size as the original cr2 file (~16megs), which is what I am looking for. so if someone could please help me out, i dread the idea of convert these one by one using gthumb.

cheers,
nap

Re: cr2 to png problem

Posted: 2010-02-11T18:57:24-07:00
by magick
We need to reproduce the problem before we can comment. Post a URL to one of your images and we will get back to you after we have a chance to analyze it.

Re: cr2 to png problem

Posted: 2010-02-11T20:03:23-07:00
by snibgo
Does gthumb make thumbnails, ie images with smaller dimensions?

Png doesn't compress photos well. A common program "pngcrush" might shrink them a little. But if you want smaller filesizes, try jpg.

Re: cr2 to png problem

Posted: 2010-02-24T17:42:50-07:00
by naphelge
We need to reproduce the problem before we can comment. Post a URL to one of your images and we will get back to you after we have a chance to analyze it.
well I just assumed I (the user) was the problem, not being very familiar with the options, I was perhaps missing something.

I do not post my photos online nor do I have a way to do so, I connect to the Internet sparingly using via GPRS and although it is deathly slow it eventually gets the job done. So, uploading large files for a problem I am certain is really just me does not make sense.
Does gthumb make thumbnails, ie images with smaller dimensions?

Png doesn't compress photos well. A common program "pngcrush" might shrink them a little. But if you want smaller filesizes, try jpg.
Does gthumb make thumbnails, ie images with smaller dimensions?

Png doesn't compress photos well. A common program "pngcrush" might shrink them a little. But if you want smaller filesizes, try jpg.
gthumb makes the converted png roughly the same size as the original cr2, and surprizingly the png creates is noticably different from the resulting png after using ImageMagick.

I have read that the png format does not compress as well as jpg, but my problem is not what format has the best compression, it is actually that the resulting converted png is 4-5 times larger than the already large cr2 original after conversion. However, I never did try just using ImageMagick to convert to jpgs to see what the result would be. I just always convert to png, so I guess I did not think of that.

I still have a stack of photos to convert, one by one is going slowly, so if anyone has any ideas, because it is very likely to be user error, I would appreciate hearing them.

cheers,
nap

Re: cr2 to png problem

Posted: 2010-02-24T19:18:44-07:00
by snibgo
Compression in jpeg and cr2 is optimised for photographs. Png compression is not optimised for photographs, so I would expect the file size to be larger.

You can compare the results from ImageMagick and gthumb:

Code: Select all

identify -verbose fromIm.png >fromIm.txt
identify -verbose fromGthumb.png >fromGthumb.txt
This should tell you why the compression is different. Post the results here, if you like, and we can try to explain them.

Re: cr2 to png problem

Posted: 2010-02-24T19:27:53-07:00
by fmw42
try adding -depth 8 to your command line if you are on Q16 IM; otherwise, if on Q16 you may be getting 16-bits per channel output rather than 8-bits per channel. That could double your filesize. (apart from the poor png compression)