[magick-users] Re: Re: Trouble converting 300dpi jpeg to 72dpi jpeg
with same size
Nicolas Dhomont
nicolas.dhomont at fluedis.com
Wed Nov 14 03:48:16 PST 2007
I'm using Imagemagick 6.2.4 10/02/2007 Q16 on linux
I used identify command as you did and I've understand a couple of things :
-- What I wanted is same geometry and lowered resolution.
-- With identify, I checked images made with old process (using
photoshop) and I noticed that 'hidef' images have both a higher
resolution and geometry than 'lowdef' images. Finally, maybe lowered
geometry and lowered resolution would be ok.
-- Using density my 'outFile' has same geometry and same resolution than
my 'fromFile'
-- /Any way I use density, identify always shows me 'fromFile'
resolution (maybe a bug, if someone wants my test logs, I can send him)/
-- Using resample my 'outFile' has same geometry than my 'outFile' made
with photoshop but resolution is still 300x300 and file size is also
bigger than 'fromFile' file size. As the goal of my process is to obtain
a lighter image, it's not usefull to me. With another message from
Anthony I've understand why file size is bigger.
As density doesn't seem to work with me and I'm not sure to understand
this (good) page : http://imagemagick.org/Usage/resize/#resample, I'll
try to use jhead or exif editor as Anthony adviced me.
Thanks (Anthony and Michal) for your support. :-)
Nicolas
Michał Skalski a écrit :
>
> I tried (on Win2k, Version: ImageMagick 6.2.2 05/04/05 Q8
> http://www.imagemagick.org)
>
> convert 32.jpg -density 72x72 32-2.jpg
>
> and this does what you want (I checked in properties of file in
> Windows Explorer)
>
> Note, that dpi is only a hint for printing software how many pixels it
> should 'stretch' on one inch on a sheet of paper and is written to
> header of JPEG file - it doesn't have any special meaning (or it
> should not have) for normal raster image processing. If you only want
> to write data do header data, you can try other software for
> processing EXIF data in JPEG files, but for me ImageMagick sets this
> density accordingly.
>
> Check excellent site of Anthony: http://www.imagemagick.org/Usage - I
> think I saw something about density on this site.
>
> Below is summary of files I converted (note Resolution)
> File 32.jpg is original one, without saved any density information.
> Files 32-1.jpg and 32-2.jpg are almost binary identical except for
> four bytes where resolution is written.
>
> c:\>convert 32.jpg -density 300x300 32-1.jpg
> c:\>convert 32.jpg -density 72x72 32-2.jpg
>
> .... logs ....
>
>
> Nicolas Dhomont pisze:
>> Thanks for your answer Michal.
>>
>> I tried :
>>
>> convert -units PixelsPerInch fromFile -density 72x72 toFile
>>
>> But 'toFile' is still in 300dpi. 'toFile' file size is even more
>> bigger than 'fromFile' file size. lol
>>
>> Nicolas
>>
>> Michał Skalski a écrit :
>>> Try -density option instead of -resample
>>>
>>> Michał
>>>
>>> Nicolas Dhomont pisze:
>>>> Hello
>>>>
>>>>
>>>> I'm trying to convert 300dpi CYMK jpeg to 72dpi RGB jpeg
>>>>
>>>> I already manage to convert from CYMK to RGB by doing the following :
>>>>
>>>> convert fromFile -antialias -colorspace RGB toFile
>>>>
>>>> I'm now trying to convert from 300 dpi to 72dpi with the following :
>>>>
>>>> convert -units PixelsPerInch fromFile -colorspace RGB -antialias
>>>> -resample 72x72 toFile
>>>>
>>>> Size of toFile is reduced by a 4,16 ratio (= 300 / 72) but still in
>>>> 300 dpi. (It means that if fromFile is 2.66inch wide, toFile is
>>>> 2.08inch wide for exemple). But I want exactly the opposite : a
>>>> file in 72 dpi with same size.
>>>> I've also played with the -density option unsuccessfully.
>>>>
>>>> As converting is quite simple with photoshop, I guess convert can
>>>> do same but I can't find out how.
>>>>
>>>>
>>>>
>>>> Any help would be highly appreciated
>>>>
>>>> Nicolas
More information about the Magick-users
mailing list