Python: Converting GIF frames to PNG

I don’t think you’re doing anything wrong. See a similar issue here: animated GIF problem. It appears as if the palette information isn’t correctly treated for later frames. The following works for me: def iter_frames(im): try: i= 0 while 1: im.seek(i) imframe = im.copy() if i == 0: palette = imframe.getpalette() else: imframe.putpalette(palette) yield imframe … Read more

How to show animated image from PNG image using javascript? [ like gmail ]

I leave you a rough example so you can get a starting point: I will use a simple div element, with the width and height that the animated image will have, the png sprite as background-image and background-repeat set to no-repeat CSS Needed: #anim { width: 14px; height: 14px; background-image: url(https://ssl.gstatic.com/ui/v1/icons/mail/im/emotisprites/wink2.png); background-repeat: no-repeat; } Markup … Read more

When to use PNG or JPG in iPhone development?

PNG’s are pixel perfect (non-lossy), and require very little extra CPU energy to display. However, large PNGs may take longer to read from storage than more compressed image formats, and thus be slower to display. JPG’s are smaller to store, but lossy (amount depends on compression level), and to display them requires a much more … Read more

Cannot convert current canvas data into image in java

Apart from making sure the the component is sized properly, use JComponent#print and JComponent#printAll methods instead. These will disable double buffering and over come some other native peer issues when it expects to be printing to the screen UPDATED From the example app… I was able to produce this dump Using this code Container pane … Read more

Resize PNG image

The original author of the PNGImage component (the basis of the Delphi native component) had a forum where he, and others, posted code snippets on how to do things using the PNGImage component. Before the forum was taken down I grabbed a copy of all of the code snippets and placed them on the CodeGear … Read more

Merge two PNG images with PHP GD library

$image1 = imagecreatefrompng(‘a.png’); //300 x 300 $image2 = imagecreatefrompng(‘b.png’); //150 x 150 imagecopymerge($image1, $image2, 0, 0, 75, 75, 150, 150, 50); this should be all you need. $image1 should hold the merged image where image2 has been overlayed with 50% opacity. the last argument is the alpha of the merged copy. http://php.net/manual/en/function.imagecopymerge.php

c# Bitmap.Save transparancy doesn’t save in png

Are you sure the pixel format of the Bitmap is System.Drawing.Imaging.PixelFormat.Format32bppArgb? I just stumbled on this question because I was having the same problem, but it was because I was loading an image which had no alpha component to its pixel format. I did Bitmap output = original.Clone(rect, System.Drawing.Imaging.PixelFormat.Format32bppArgb); and it properly saved the PNG … Read more