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?
Problem with -resize JPGs
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Problem with -resize JPGs
See you other thread.
It is probably your viewer, or the images 'density'.
It is probably your viewer, or the images 'density'.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Problem with -resize JPGs
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:
but i get no final.jpg
if i do it in two steps it works;
so did i something wrong in the first code with the syntax?
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);
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);
Re: Problem with -resize JPGs
now i tried it with different pics with diferent dpi with this code
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...
Code: Select all
usr/bin/php-smed/convert photo.jpg -density 72x72 -units PixelsPerInch final.jpg
but if the photo has 120dpi i get no final.jpg
i don´t understand why is it like that...
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Problem with -resize JPGs
You are the second person to have this problem.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Problem with -resize JPGs
could this be a problem with the unix version or what?
or a configuration problem? what can i do?
or a configuration problem? what can i do?
Re: Problem with -resize JPGs
know i know one thing more - the image which is not works is a cmyk image not a rgb
so i try this code
but once again i get no final.jpg
maybe somebody has now a idea or knows a solution for this cmyk/rgb thing...
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);
maybe somebody has now a idea or knows a solution for this cmyk/rgb thing...
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Problem with -resize JPGs
In that case report a bug in the bugs forum with a link to the JPEG that does not work.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/