Is it possible to convert eps to png24 that is grayscale using ghostscipt - ghostscript

It seems that ghostscript uses different device for PNG24 and grayscale.
Is there a way to convert an EPS file to PNG24 format that is grayscale?

Related

Image magick convert pdf to tiff file

Having problem with image magick cant convert chinese name from textfield of pdf.
Is there anyone know how to deal with this?

Can a PNG image contain multiple pages?

On OSX I converted a multi-page PDF file to PNG and (somehow) it created a multi-page PNG file.
Is there an extension to the PNG format that allows this? Or is this not something I can validly create?
~~~~
To clarify, this is a PNG file, per the builtin file command and the identify command from imagemagick.
$ file algorithms-combined-print.png
algorithms-combined-print.png: PNG image data, 1275 x 1650, 8-bit/color RGBA, non-interlaced
$ identify algorithms-combined-print.png
algorithms-combined-print.png PNG 1275x1650 1275x1650+0+0 8-bit sRGB 3.537MB 0.000u 0:00.000
And here is a pastebin of the command identify -verbose algorithms-combined-print.png: http://pastebin.com/hw1yuRKa
What is notable from that output is that the pixel count is Number pixels: 2.104M which corresponds to one page. However, the file size is 3.537MB, which is clearly sufficient to hold all the pages.
Per request, here is the output of pngcheck: http://pastebin.com/aCRMEd9L
PNG does not support "multipage" images.
MNG is a PNG variant that supports multiple images - mostly for animations, but it's not a real PNG image (diffent signature/header), and has never become popular.
APNG is a similar attempt, but more focused on animations - it's more popular and alive, though it's less official - it's also PNG compatible (a standard PNG viewer, unaware of APNG, will display it as a single PNG image).
Another possible explanation is that your image is actually a TIFF image with a wrong .png extension, and the viewer ignores it.
The only way to know for sure is to look inside the image file itself (at least to the first bytes)
Update: given the pngcheck output, it seems to be a APNG file.

How Do I Convert Palette-Based PNG with Transparency To RGB in PIL?

I'm currently building a site in app engine that uploads images to google cloud storage and to complete basic manipulations I'm using python's PIL
I've been having problems with the following image which another stackoverflow member has mentioned is a palette-based PNG with transparency, which I've been reading may be a bit buggy in PIL
My question is really a back to basics one: What is the best way to convert this to an RGB format with transparent pixels set to #FFF? I've been able to get it to work through a combined RGBA then RGB paste but that seems redundant
However, for a direct conversion I'm getting a bad transparency mask i.e. using the solution from PIL Convert PNG or GIF with Transparency to JPG without
Also if anybody has ideas why the image degrades to terrible quality after conversion, that's entirely a bonus for me!
A way to do this is to first convert the file to jpg -- seems like a problem with the png encoding (or something related to that)
Check out this link that I used and got smooth conversion from transparent PNG to GIF:
Convert RGBA PNG to RGB with PIL
The function you are looking for is pure_pil_alpha_to_color_v2.
I also used for my image conversion tool PySmile:
https://github.com/vietlq/PySmile/blob/master/pysmile.py

How to determine image colorspace using WIC?

How can I determine the colorspace of an image using WIC? I want to know if an image is RGB, CMYK or mono(B/W). I would prefer not looking at every color format available.
Why I want to know is I want to use IWICColorContext::InitializeFromFilename method but to give it a proper profile I need to know if the image is RGB, CMYK or mono.

How to convert svg to eps using Imagemagick?

I am trying to convert svg image to eps using Imagemagick. I am able to convert the image using Imagemagick, but the image size is too high when compared to the original image size and the content is not displayed correctly compared to the svg.
I was just wondering this too. However, it appears that Imagemagick might not be the best tool to do this.
Imagemagick is a "raster image processor," but SVG and EPS are vector formats. So using Imagemagick will cause those images to lose information as it has to convert from a vector format, to a raster format, and then back to vector. This probably explains why the contents of your image aren't correctly displayed.
Maybe consider using Inkscape to do this conversion using the following
# Works as of Version 0.92.4
inkscape ing.svg \
-E out.eps \
--export-ignore-filters \
--export-ps-level=3
where the -E flag is short for --export-eps to export EPS files.
Source:
http://imagemagick.org/Usage/formats/#vector
https://stackoverflow.com/a/30539923/6873133

Resources