png

GDI+ crashes when loading PNG from IStream

I wrote something to load PNG files from a custom C++ IStream via GDI+. It worked great until I ran it on Vista machines. Crashes every time. When compiled on VS 2008, I found that inserting code into the IStream::AddRef method, such as a cout, made the problem go away. When compiling with VS 2010, it still crashes regardless of that. ...

Better png for iexplorer 6 with fireworks instead of pngfix?

Hi, I have made some screenshots of my website, and in internet explorer 6 my website looks crappy (see screenshot) I have heard something about a PNG fix, is a PNG fix the way to solve the crappy look? Do you think this could be helpfull for me? ...

PHP + GD: imagetruecolortopalette not keeping transparency

I am using GD to output an image that is a truecolor+alpha channel PNG file using imagepng just fine. However, I would like to have the ability to also output an ie6-compatible 256-color PNG as well. According to the official documentation for imagetruecolortopalette: The code has been modified to preserve as much alpha channel inf...

Can an HTML img tag have multiple src attributes?

Much like how the video tag can provide multiple source attributes so an mp4 video can fall back to an ogg video, I would like to get an svg image to fall back to an png image. ...

Convert png file to ico with PHP

Hi, I would like to create a PHP script that convert a png file to an ico file. Is it possible to do it just with PHP ? How ? Thanks !!! ...

Manipulating PNGs in Java

Is there an easy way to manipulate PNGs in Java? I know I can read into a BufferedImage and write that back out, but I need to add clear pixels around the edge of an image. Is there an easy way to do this? ...

jquery toggle and transprent PNG

i have a jquery toggle that animates and displays a DIV. i have a transparent PNG , drop shadow type background image, and when it first appears, i see a black background then it dissapears once the image loads... is there a way around that? is that a bug? i have it animating slow, so maybe that has something to do with it... should ...

PHP GD issues with ImageCreateTrueColor and PNGs

I am resizing PNG images using the GD image library function ImageCopyResampled(). It all works fine, I can even keep alpha blending transparency with the use of ImageCreateTrueColor() rather than using ImageCreate() to create the resized image. The problem is, that if I use ImageCreateTrueColor() rather than ImageCreate() the file size...

Strange problem when converting RGB to HSV

Hi, I made a small RGB to HSV converter algorithm with C. It seems to work pretty well, but there is one strange problem: If I first convert i.e. a 800x600 picture into HSV map and then back to RGB map without doing any changes in the values, I get some pixels that are convertet incorrectly. Then if I try to convert those misbehaving si...

Obey the MediaBox/CropBox in PDF when using ghostscript to render a PDF to a png

I've been using ghostscript to convert my single figure plots rendered in PDF to png: gswin32c -sDEVICE=png16m -r300x300 -sOutputFile=junk.png -dBATCH -dNOPAUSE Figure_001-a.pdf This works in the sense I get a png out and it contians the plot. But it contains a huge amount of white space as well (an example source image: http://cdsweb...

Loading PNG textures to OpenGL

Hello, I'm working on a game, and all of my graphics use magenta as transparent/magic color. They are all 32-bit and the magenta is just for conveniency. Anyway, I would appreciate if someone could advice me what library should I use to load my images (I need to load them in GL_RGBA format, both internal and texture specific). ...

Should all .png files be in power of two on the Iphone?

Hi All, When creating an UIImage file from a .png to be displayed on a button, view/cell background, etc. for a standard Iphone application, should all of them be in powers of 2 for optimization reasons? ...

DrawImage in XP Mode or Remote Desktop

I'm displaying a PNG with a transparent background that looks good in Windows 7, but then I run my app in XP Mode or remote desktop to a Windows XP machine and the PNG looks incorrect. I noticed that if I disable "Integration Mode" or run the app on XP without remote desktop, the image looks fine. How do I get DrawImage to render the PN...

How to save optimized png images with java's ImageIO?

I am generating lots of images in java and saving them through the ImageIO.write method like this: final BufferedImage img = createSomeImage(); ImageIO.write( img, "png", new File( "/some/file.png" ); I was happy with the results until Google's firefox addon 'Page Speed' told me that i can save up to 60% of the size if i optimize the ...

Why '.png' files produced by ImageMagick are so much bigger than '.jpg' & '.gif' files?

Hello. I'm using ImageMagick to convert some files from one format to another. I was always under the impression that .png files were supposed to be as big/small as .jpg if not smaller, and definitely smaller than .gif. However when I run convert photo.jpg photo.png The files I'm getting out is about 6 times bigger than the origin...

How to load an ImageView from a png file?

I take a picture with the camera using Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE ); startActivityForResult( intent, 22 ); When the activity completes, I write the bitmap picture out to a PNG file. java.io.FileOutputStream out = openFileOutput("myfile.png", Context.MODE_PRIVATE); bmp.compress(...

Should we bother about IE < 8?

Hi there. It might look like philosophical question, however it really bother me. We're expecting HTML 5, we're using JS, Ajax, Flex, all this stuff, but when older browsers were devleoped, nooone even dreamed about such technologies. IE6 can't see transparency in PNG's. Some correct W3C techniques, are bad interpreted by IE6. It's ju...

how to compress a PNG image using Java

Hi I would like to know if there is any way in Java to reduce the size of an image (use any kind of compression) that was loaded as a BufferedImage and is going to be saved as an PNG. Maybe some sort of png imagewriteparam? I didnt find anything helpful so im stuck. heres a sample how the image is loaded and saved public static Buffer...

Does Webkit render 8bit PNGs correctly

I've come across a weird problem whilst trying to optimise the following image: It should have a little shadow down each of the left and right hand sides. However, in webkit (tried mac safari and chrome) the right hand edge loses its little shadow entirely. I've used multiple utilities to create the image and even tried copying a flip...

png image blurry when loaded onto texture

I have created a png image in photoshop with transparencies that I have loaded into and OpenGL program. I have binded it to a texture and in the program the picture looks blurry and I'm not sure why. Loading Code // Texture loading object nv::Image title; // Return true on success if(title.loadImageFromFile("test.png")) { glGe...