Questions tagged [png]

PNG (Portable Network Graphics) is an image file format designed to store raster graphics. It is associated with ".png" file extension. Use this tag for questions involving this specific format.

PNG was created to improve upon and replace (Graphics Interchange Format) as a losslessly compressed image file format not requiring a patent license.

PNG supports palette-based images with transparency, true colour images with or without alpha channel (RGB, RGBA), and grayscale images; PNG supports channel depths from 1-bit to 16-bit per channel. Interlacing, which allows the progressive display of partially downloaded images, is implemented via the Adam7 algorithm. Animation is supported by way of the extension.

More information

6735 questions
28
votes
5 answers

How can I edit Chrome MIME type mappings?

I opened a image/x-png type image in new tab, but Chrome just downloaded it. I googled it and found that Chrome doesn't interpret image/x-png as image file. So, I want to edit my Chrome's MIME type mappings. Is it possible?
Ohgyun Ahn
  • 777
  • 1
  • 10
  • 16
28
votes
2 answers

How to make a color transparent in a BufferedImage and save as PNG

I have been searching the web for this, but I havent found any decent help. I have a BufferedImage, which I have read in with ImageIO. Now I would like to make a certain color in that image to transparent, and save the image as PNG. I know I cannot…
corgrath
  • 11,673
  • 15
  • 68
  • 99
28
votes
1 answer

How do I save custom information to a PNG Image file in Python?

I would like to open a PNG image in Python, add some custom data to it, save the image file and at a later time open it again to retrieve the data. I am working in Python 3.7. I would prefer to use the PNG image format but could move to another…
TafT
  • 2,764
  • 6
  • 33
  • 51
28
votes
2 answers

Mac Terminal - Create animated gif from png files

I have a bunch of png files named as 1.png, 2.png, etc. and I want to create an animated gif image from them all. I haven't been successful in finding a solution for a terminal command that will convert these png files into a single animated…
StanLe
  • 5,037
  • 9
  • 38
  • 41
27
votes
3 answers

Convert android vector drawable XML to SVG

How can I convert my android vector drawable to SVG? Don't mark it as duplicate question. I have already tried those methods but didn't work, what I have tried https://shapeshifter.design/ website, but actually it is good, but it gives me wrong…
27
votes
2 answers

Detecting corrupted images in bash script

I have >2000 images from a webcam stream (for a time-lapse video), I need to delete all incomplete & corrupted images, before passing them to a php-gd script that edits them for the final video. Is it possible to detect corrupted files with…
skazhy
  • 4,421
  • 7
  • 30
  • 32
27
votes
1 answer

Which image format i should for ios development native ? SVG or PNG?

I am into iOS development from past 1+ months and what I have experienced is that I have to put images for 1x 2x 3x for iphone and then 2x retina for ipad. One of the experienced designers has sugguested to me to go for svg format as it scales…
narahari_arjun
  • 623
  • 1
  • 13
  • 30
27
votes
5 answers

Clicking through a transparent .png

First off, I would like to say that myspace is a pain. But, musicians love it, and I can make some money doing layouts for them. I overlayed a layer of .png's over myspace's original look, but need to utilize the myspace music player. So, I made a…
gpretty
  • 271
  • 1
  • 3
  • 3
27
votes
4 answers

How to encode PNG to buffer using libpng?

I'm currently using the following to write a PNG to a file: #include #include #include #include /* Pixels in this bitmap structure are stored as BGR. */ typedef struct _RGBPixel { uint8_t blue; …
Sam
  • 810
  • 2
  • 11
  • 20
27
votes
4 answers

Fastest PNG decoder for .NET

Our web server needs to process many compositions of large images together before sending the results to web clients. This process is performance critical because the server can receive several thousands of requests per hour. Right now our solution…
sboisse
  • 4,860
  • 3
  • 37
  • 48
27
votes
6 answers

iOS PNG Image rotated 90 degrees

In my iOS application I'm writing, I deal with PNGs because I deal with the alpha channel. For some reason, I can load a PNG into my imageView just fine, but when it comes time to either copy the image out of my application (onto the PasteBoard) or…
Boeckm
  • 3,264
  • 4
  • 36
  • 41
26
votes
3 answers

animation alpha change

I've always worked with Flash, and it's pretty easy to change the alpha values between one frame and another. Is there a way to do this in xcode 4? I'm animating a logo and I need the first png to disappear while the second one starts appearing.…
Melisa D
  • 273
  • 1
  • 3
  • 12
26
votes
20 answers

Ethical Dilemma: Should I still cater for IE6 as a web-developer

Possible Duplicates: IE6: To support or not to support. Should we support IE6 anymore? I'd hate to (HATE TO) admit it, but there are some people still using this browser. A client of mine is facing an issue where the "transparency" area of a png…
Dan Hanly
  • 7,829
  • 13
  • 73
  • 134
26
votes
2 answers

iPhone: Changing CGImageAlphaInfo of CGImage

I have a PNG image that has an unsupported bitmap graphics context pixel format. Whenever I attempt to resize the image, CGBitmapContextCreate() chokes on the unsupported format I receive the following error (error formatted for easy…
TechZen
  • 64,370
  • 15
  • 118
  • 145
25
votes
7 answers

Insert a text chunk into a png image

I'm looking for a simple command-line tool (on Linux) to insert a text chunk (e.g. copyright) into a png file, resulting in a new png file: > png-insert-text-chunk "here's my text chunk" < in.png > out.png Note: by "insert a text chunk", I do not…
gcbenison
  • 11,723
  • 4
  • 44
  • 82