Search found 7 matches

by sir8472
2020-02-21T02:22:31-07:00
Forum: IMagick
Topic: Imagick 1687 upgrade to 1690 errors IO error writing tag data
Replies: 2
Views: 2683

Re: Imagick 1687 upgrade to 1690 errors IO error writing tag data

Apologies, I'm still finding my way around the forums. This is issue relates to imagick, the PHP implementation only. I'm able to run the following command and generate a TIFF file without issue: convert -format tiff -type TrueColorAlpha -colorspace sRGB -depth 8 storage/app/raw/2020/2/19/704608e4d1...
by sir8472
2020-02-20T04:44:25-07:00
Forum: IMagick
Topic: Imagick 1687 upgrade to 1690 errors IO error writing tag data
Replies: 2
Views: 2683

Imagick 1687 upgrade to 1690 errors IO error writing tag data

After a recent update to my production environment, I seem to be having problems with writing certain TIFF files. I’ve produced a cut-down PHP code snippet that reflects what’s happening in production: $img = new Imagick('source_1.png'); $img->setImageFormat('tiff'); $img->setType(\Imagick::IMGTYPE_...
by sir8472
2018-12-17T15:50:19-07:00
Forum: MagickWand for PHP
Topic: force greyscale image to sRGB
Replies: 6
Views: 13255

Re: force greyscale image to sRGB

For completeness and to any lost coder who needs to do something similar, this is what I've ended up with in PHP: $img = new Imagick(); $img->readImage('in.png'); // Convert the image to a TIF file $img->setImageFormat('tiff'); // Set the image type to TrueColour Matte (transparency should be preser...
by sir8472
2018-12-13T04:31:09-07:00
Forum: MagickWand for PHP
Topic: force greyscale image to sRGB
Replies: 6
Views: 13255

Re: force greyscale image to sRGB

Well, in the absence of a PHP solution, and a need to get sRGB TIF files through I have created the following script which may be useful to someone else in the future as a starting point. #!/bin/bash ############################################ # convertGreyscaleTosRGB # Transform images from "Gray"...
by sir8472
2018-12-13T02:56:15-07:00
Forum: MagickWand for PHP
Topic: force greyscale image to sRGB
Replies: 6
Views: 13255

Re: force greyscale image to sRGB

The imagick object is actually handed off to a storage class to write to disk. Live code doesn't actually "file_put_contents", but I bet it doesn't use writeImage either, which is why I didn't include it here. If it makes you feel any better I can use writeImage in the example, file output is the sa...
by sir8472
2018-12-13T02:12:55-07:00
Forum: MagickWand for PHP
Topic: force greyscale image to sRGB
Replies: 6
Views: 13255

Re: force greyscale image to sRGB

From various searches on Stack Overflow and this forum, I had assumed "type" needed to be used with the "colorspace" option, though I admit my interpretation is coloured (pun) by lack of knowledge in this area. $img->setoption("colorspace:auto-grayscale", "off"); Is another option I've found through...
by sir8472
2018-12-13T00:53:28-07:00
Forum: MagickWand for PHP
Topic: force greyscale image to sRGB
Replies: 6
Views: 13255

force greyscale image to sRGB

I am hoping someone can help, as I'm a little bit stuck with some code. From the command line, I can take an input PNG file, convert it to TIF and force it to sRGB using the following: convert in.png -colorspace srgb -type truecolor out.tif and it outputs a TIF file with: colorspace:13 (Imagick::COL...