Page 1 of 1

Problem with -resize JPGs

Posted: 2007-07-11T03:26:21-07:00
by kleinstadtmc
i have IM 6.3.5 - and i try to resize jpgs over php with the exec() function
and a lot things works with IM - but i have problems with the -resize at some jpgs

if i put a jpg from istockphoto on my webspace and try to resize it with IM - it dont works

but if i take the jpg and open it in my photoshop and save it with the "save for web" modul
and put it on my webspace - now resize works with IM... and it doesnt matter if i save it in photoshop with a large or small file/pic size

but if i try the same with the standard save as jpg function in photoshop - it doesnt work with IM - and it doesnt matter if i save it with a large or small file/pic size

somebody know what the problem is?

Re: Problem with -resize JPGs

Posted: 2007-07-11T03:50:16-07:00
by anthony
See you other thread.
It is probably your viewer, or the images 'density'.

Re: Problem with -resize JPGs

Posted: 2007-07-11T05:48:37-07:00
by kleinstadtmc
ok - it seemed to be a problem with the resolution

because the original photo has 300dpi
the photos wich i save with the "save for web" function has 72dpi

now i try this code with the 300dpi photo:

Code: Select all

$convert = '/usr/bin/php-smed/convert photo.jpg -resize 248x350 -density 72x72 -units PixelsPerInch final.jpg';
exec($convert);
but i get no final.jpg

if i do it in two steps it works;

Code: Select all

echo $convert = '/usr/bin/php-smed/convert photo.jpg -density 72x72 -units PixelsPerInch photo72dpi.jpg';
exec($convert);
#echo $convert = '/usr/bin/php-smed/convert -size 248x350 xc:red \ photo72dpi.jpg -resize 248x350 -geometry +10+10 -composite final.jpg';
#exec($convert);
so did i something wrong in the first code with the syntax?

Re: Problem with -resize JPGs

Posted: 2007-07-11T07:04:57-07:00
by kleinstadtmc
now i tried it with different pics with diferent dpi with this code

Code: Select all

usr/bin/php-smed/convert photo.jpg -density 72x72 -units PixelsPerInch final.jpg
with 72dpi and 300dpi photos i have no problem
but if the photo has 120dpi i get no final.jpg

i donĀ“t understand why is it like that...

Re: Problem with -resize JPGs

Posted: 2007-07-11T19:05:47-07:00
by anthony
You are the second person to have this problem.

Re: Problem with -resize JPGs

Posted: 2007-07-11T23:16:18-07:00
by kleinstadtmc
could this be a problem with the unix version or what?
or a configuration problem? what can i do?

Re: Problem with -resize JPGs

Posted: 2007-07-12T00:27:48-07:00
by kleinstadtmc
know i know one thing more - the image which is not works is a cmyk image not a rgb

so i try this code

Code: Select all

echo $convert = '/usr/bin/php-smed/convert photo.jpg -density 72x72 -units PixelsPerInch -colorspace RGB final.jpg';
exec($convert,$result);
but once again i get no final.jpg

maybe somebody has now a idea or knows a solution for this cmyk/rgb thing...

Re: Problem with -resize JPGs

Posted: 2007-07-12T00:47:03-07:00
by anthony
In that case report a bug in the bugs forum with a link to the JPEG that does not work.