we try on our website to uplaod a custom image and place this on a shirt. but the quality of the uploaded image is still not 100% good quality. here you find a snippet of our code
$im = new Imagick();
if ($file_format == 'eps') {
$im->setColorspace(Imagick::COLORSPACE_RGB);
}
$im->setResolution(150, 150);
$im->readImage($input_file);
$im->setImageUnits(Imagick::RESOLUTION_PIXELSPERINCH);
//$im->setImageResolution(150, 150);
$im->resizeImage(400, 400, imagick::FILTER_LANCZOS, 1, true);
$im->setImageFormat($output_format);
this is our result here (bad) http://www.shirtee.de/media/bad-result.png
here is the good result from other company site http://www.shirtee.de/media/good-result.png
here you find the original file http://www.shirtee.de/media/sailing.png
any idea? thanks!
Image upload placed on shirt
Re: Image upload placed on shirt
I am not an IMagick expert so I don't know what $blur does in '$im->resizeImage(400, 400, imagick::FILTER_LANCZOS, 1, true)' but you might want to lower the '1' value. What happens when you use '0.5' or '0.0' instead?
Re: Image upload placed on shirt
thanks for you replay, the result is a little bit better, but not 100% anymore. perhaps has anyone else a idea?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Image upload placed on shirt
Your input is a vector format (EPS). So you probably need to set the density to some large value (say 288=72*4) before reading the input image. Then resize by 25% after reading the input image (or to the default size as determined by 72 dpi).
According to the Imagick manual, blur=1 is no blur. Blur>1 is blurring. Blur<1 is sharpening. So use blur=1 to start.
According to the Imagick manual, blur=1 is no blur. Blur>1 is blurring. Blur<1 is sharpening. So use blur=1 to start.