png

Ruby: Find non-transparent PNG and convert into JPG

What is the smartest way to find out if a PNG has transparency or not in Ruby? Is it OK if I just check if there's an alpha-channel? If yes: How do I check for an alpha-channel? I'm writing a script that will convert all PNGs without transparency into smaller JPGs. Thanks a lot for your help! ...

Combine 4 transparent PNG images on top of each other in an ASP.NET environment.

I came across the solution I need in PHP but I need one that I can use that's just as simple in an ASP.NET environment. I am combining 4 transparent png images to create a single image (Lets say its a custom certificate) with one of 4 background images, one of 4 header logos, one of 18 category titles and another variable image that sta...

How can I convert a JPEG image to a PNG one with transparent background?

Hi, I have a JPEG format image, with a white background and a black circle. How can I transform this image to a PNG format that the white background will be transparent and the black remains there? I'm a programmer too, and if there are some ideas in C# code I will be very happy. Also I'm looking for a converter, tool, program anythin...

wxWidgets custom window shape (PNG)

Hi! I'm using wxPython bindings for wxWidgets. Is it possible to create custom-shaped window from PNG image and in count alpha-channel? Take a look at VS2010 splash screen to see what I mean: Highlighted zones (rounded corner and shadow) are not sharp, they use alpha-channel to look smooth. Update: I want not only custom shape, but ...

Fast loading of PNG image into an array in java

I want to load (and decode) PNG images and convert them into a one-dimensional array in Java. I can obviously do this with ImageIO.read() and then copy the pixels into the array, but that consumes twice the memory (the raster + the final array) and it involves more processing time than I would like. How should I go about this? Worst-cas...

Inconsistent behavior when saving a PNG to Response.OutputStream

This question is related this one: http://stackoverflow.com/questions/582766/cannot-render-image-to-httpcontext-response-outputstream. It is not a duplicate. When attempting to save a PNG to the Response.OutputStream I am experiencing inconsistent behavior between the local development environment and the production environment. Namely,...

How to combine multiple PNGs into one big PNG file?

I have approx. 6000 PNG files (256*256 pixels) and want to combine them into a big PNG holding all of them programmatically. What's the best/fastest way to do that? (The purpose is printing on paper, so using some web-technology is not an option and having one, single picture file will eliminate many usage errors.) I tried fahd's sugg...

When to use PNG or JPG in iPhone development?

I have an app that will display a bunch of images in a slideshow. Those images will be part of the bundle, thus distributed with the app. All the images are photographs or photographic, etc. I've read that it's preferred to use PNG as the image format, but seeing that the JPG version will be much smaller, I'd rather be using that. A...

Convert Images with PHP without using ImageMagick

I need to convert a .JPG, .JPEG, .JPE, .GIF, etc to a .PNG from my PHP webpage without using ImageMagick. Any ideas? Here is the code I found and am trying to work with: <?php header("content-type: image/png"); $original_filename = $_HTTP_POST_FILES['uploaded_file']; imagepng($original_filename,'border/testconvert.png',9); ?> ...

Convert .BMP to .PNG with PHP

I needed to be able to convert different image formats to the .PNG format. With the help of some others, I was able to make that happen. The only issue is, I also need to be able to convert .BMP files to .PNG without the use of ImageMagick. Here is the code I used for the conversion of other files: <?php $filename = "myfolder/test.jpg...

Is it possible to save SymPy's image to the image object from PIL Image?

Hi, there. May I ask is it possible to save SymPy's image to the image object from PIL Image? I really need to do this. And so far I 've got no idea around this, please help with this, thank you! ...

Help fixing the image library.

Hi, I have a problem with an image library. I think I know the problem but I know very little about images and was hoping that someone could tell me what precisely is going wrong. What I am trying to do is resize a .png and preserve the transparency. When I resize and save a .png image it looses its transparency and turns black. I bel...

[Windows Imaging] Prevent GDI+ PNG Encoder from adding Gamma information to a 1-bit PNG

I wonder if its possible to instruct the Imaging PNG Encoder not to add any gamma and chroma informations to a 1-bit PNG. I am creating a 2 color palette for the image ColorPalette* pal = (ColorPalette*)CoTaskMemAlloc(sizeof(ColorPalette) + 2 * sizeof(ARGB)); pal->Count = 2; pal->Flags = 0; pal->Entries[0] = MAKEARGB(0,0,0...

Is there any library to Convert flash to a represent png file?

I want to generate thumbnail image from a flash file, Is there any library to do this? Many thanks ...

reduce opacity of "PNG" images in IE

hi everyone I want to reduce opacity of "PNG" images in IE. Alpha filter works well in mozilla but in IE there is black outline around image. I dont want transparent PNG image for IE. I want to set opacity of PNG image in IE. Thanks alot for help Regards ...

How to anti-alias a dynamically loaded PNG in Flash

Hello everyone, I have a Flash file that I use to load in transparent PNG's (line-drawings), and use Flash to allow the user to select the color of drawing, and instantly change the color. This is all working like it should be. I am using the UILoader component to load in the image that I recieve through flashvars, and then change the ...

Sending PNG attachment via Android GMail app

I'm attaching a PNG image to an e-mail with the following code: ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, title); values.put(MediaStore.Images.Media.DESCRIPTION, title); values.put(MediaStore.Images.Media.MIME_TYPE, "image/png"); Uri uri = activity.getContentResolver().insert(MediaStore.Images...

Loading PNGs with CImg

I am unable to load PNGs with CImg. I've heard you need to get libpng / zlib to get to work first but I am unsure how to set this up. I am on Ubuntu. My source: #include <cmath> #include <cstdio> #include <string> #include <assert.h> #include <stdarg.h> #define cimg_using_png #include "CImg.h" using namespace cimg_library; #include "pn...

Saving inkpresenter as png

Is it possible to save an inkpresenter's content as a .png image? If not is there an alternative to inkpresenter that can be drawn on, and saved? ...

Flex - Copying a Single frame ftoma Video

I'm working with video in Flex. I'd like to be able to pause the video at a certain point and copy the displayed frame as an image, and save it to a database. I'm wondering if anybody knows how I might copy a single frame from a paused video? Thanks --Matt ...