How to convert bmp to png and keep alpha channel? - image

I have a p.bmp file, it look like has a alpha channel. so i try to convert it to png file by use imagemagick.
But whatever i try, the png file cannot keep the alpha channel:
The p.bmp file:
convert p.bmp p.png
(source: meteor.com)
convert p.bmp png24:p24.png
(source: meteor.com)
convert p.bmp png32:p32.png
(source: meteor.com)
Could anyone help me to find the alpha data in the p.bmp file, and convert it to png file?

You discovered a bug in ImageMagick. This will be fixed in ImageMagick 6.8.7-9. I am one of the developers for ImageMagick and I just committed the fix to our SVN repository (http://trac.imagemagick.org/changeset/13867).

Related

How to convert PNG to uncompressed DDS in Linux?

Based on wiki DDS could be compressed and uncompressed.
Now I'm trying to figure out how to achive converting png to dds without compression.
Regular converting could be achived with
convert file.png out.dds
It looks like you found a missing feature in ImageMagick. This is now only supported:
convert file.png -define dds:compression=none out.dds
But the following should work:
convert file.png -compress none out.dds
I just pushed a patch to the ImageMagick repository to add support for the -compress option that will be available in the next release.

ImageMagick, Convert command degrades image actual Quality

I have been trying to convert JPG image which is in CMYK format to sRGBformat with imagemagick library in Ruby on Rails.
But unfortunately, observed that quality of the image degraded after convertion of image by following command:
MiniMagick::Tool::Convert.new do |convert|
convert << attachment.tempfile.path
convert.merge! ["-colorspace", "srgb"]
convert << attachment.tempfile.path
end
Is there anything missing here? and looking forward to avoid the deviation.
Please let me know your ideas.
You can try to use the ImageMagick -profile option for better conversion:
convert image.jpg -profile sRGB.icc rgb_image.jpg
You can look here for more details on ImageMagick.

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 could create image watermark using ImageMagick

I am trying to convert a 8bpp (256) color gif to a 2bpp (4) color gif through ImageMagick.
How can i put an semi-transparent image to the output file in ImageMagick?
You can use ImageMagick's composite command.
Here are a couple links to tutorials and examples of using ImageMagick to add watermarks to your pictures:
from the ImageMagick help files
a blog example
yet another blog example

Convert JPEG file to MPEG still frame format

Anyone know how to convert a JPEG image to MPEG still frame format? I'd love to do it in java but a linux command line process would be ok. (I saw something on code project that does this for c sharp).
I haven't done it myself but here is an overview of converting JPEG's into MPEG's. I would take a look at using FFMPEG.
Overview Link: http://electron.mit.edu/~gsteele/ffmpeg/
FFMPEG: http://ffmpeg.mplayerhq.hu/

Resources