When I am converting an EPS to PNG with imagick for generating a thumbnail preview. The result is very bad around the edges of a EPS without a background.
The Colorspace is CMYK but the result is the same using RGB. As I read, PNG does not support CMYK so I have to convert it first to SRGB. But It does not change anything. Normally I would set the resolution to 72dpi, but I also have tested it with 300dpi. Is there maybe a special order for the method calls to consider?
My Code:
$im = new \Imagick();
$im->setResolution(72, 72);
$im->setColorspace(imagick::COLORSPACE_SRGB );
$im->readImage($target_file);
$im->setImageAlphaChannel(imagick::ALPHACHANNEL_DEACTIVATE);
$im->setImageDepth(8);
$im->adaptiveResizeImage(800, 0);
$im->setImageFormat("png");
$im->writeImage($thumb_dir . basename($zoom_file_ne . '.png'));
$im->destroy();