EzDevInfo.com

png interview questions

Top png frequently asked interview questions

Export frames of animation separately

I'm working with lots of Photoshop animations provided to me by a designer. Each one is made of six frames, and I need to export each frame so that they have the titles (say): left*.png, where * is 0-5 depending on the frame.

Does anyone know if there's a quick way of doing this? So far I've been doing it by hand, but this is obviously far from ideal considering I have many animations to get through!


Source: (StackOverflow)

How to convert GIF files to PNG or JPEG in OS X with command line?

I have 10k+ GIF files that I need to convert to PNG or JPEG preferably using command line so that I can automate it. I'm not worried about losing quality or transparency, just need to prepare files for OCR software.

When trying to use convertformat, I get this:

Error in pixReadStreamGif: function not present
Error in pixReadStream: gif: no pix returned
Error in pixRead: pix not read
Error in pixGetDepth: pix not defined
Error in pixWrite: pix not defined

Any ideas?


Source: (StackOverflow)

Advertisements

Why does this PNG image display differently in Chrome & Firefox than in Safari and IE?

Check this image out:

Apple or Pear

On Chrome and Firefox it will show as a pear. Now, try to save it and look at it saved on your desktop. Also, try viewing in Safari or Internet Explorer. It will display as an apple!

Try clicking the image and moving it around. You will notice the apple appears.

Why does this happen?


Source: (StackOverflow)

How is PNG lossless given that it has a compression parameter?

PNG files are said to use lossless compression. However, whenever I am in an image editor, such as GIMP and try to save an image as a PNG file, it asks for the compression parameter, which ranges between 0 and 9. If it has a compression parameter that affects the visual precision of the compressed image, how does it make PNG lossless?

Do I get lossless behavior only when I set the compression parameter to 9?


Source: (StackOverflow)

Batch converting PNG to JPG in linux

Does anyone know a good way to batch-convert a bunch of PNGs into JPGs in linux? (I'm using Ubuntu).

A png2jpg binary that I could just drop into a shell script would be ideal.


Source: (StackOverflow)

How to convert a PDF document to PNG?

Is there a free way to convert a PDF document to a PNG image?


Source: (StackOverflow)

Command-line application for converting SVG to PNG on Mac OS X

Are there any command-line programs that can convert an SVG to PNG, that run on Mac OS X?

Edit: Dylan B had a good answer with ImageMagick. For reference, to install ImageMagick with SVG support on Mac OS X using MacPorts, do

port install imagemagick +rsvg

Source: (StackOverflow)

Is there still any reason to prefer GIF over PNG when creating images for web pages? [closed]

Long ago, I used to avoid the PNG image format when building web pages because browser support was lacking. I remember having a PNG on a page could cause the QuickTime plugin to be loaded - yuck.

Today, every modern browser now supports PNG well and I'm using it in my web pages because:

  • Compared to JPEG, PNG compression isn't lossy. Especially important for logos/drawings/charts.
  • Compared to GIF, PNG isn't limited to 256-colors. Matters a lot with gradients.

In other words, with PNG, my images start looking sharp, and stay that way.

I can still see JPEG being useful because it compresses much better and loses very little visual quality for photos in particular.

And so my question is: What use cases remain for using the GIF file format in web pages? Is GIF now completely obsolete by PNG and its adoption, or are there specific things GIF is still good at?


Source: (StackOverflow)

How do I convert (.gif to .png) this image to get the original view?

I am trying to convert this image, http://en.wikipedia.org/wiki/File:Dijkstra_Animation.gif, to a series of .png files.

This was pretty simple, I used the convert command in Linux,

convert  Dijkstra_Animation.gif dijkstra.png

The command went fine and produced the 27 frames, as reported at the bottom of original page.

However, I find that some of the produced .png files are only single numbers or arrows. Which is different from what I expected.

I want the .png files to be a simple sequence in the same way the .gif file is showing. Could you please suggest a method (in Linux please) to achieve this?

Thanks.


Source: (StackOverflow)

How do I convert a .PNG into a .ICO?

There's an image in the VS2010 stock icon pack which is only included as a PNG, which I would like to use as an ICO (I want XP and earlier users to see the icon). How can I convert the PNG into the ICO?


Source: (StackOverflow)

Multiply blending mode to PNG

I have a layer in Photoshop with multiply on, when I however save to web it loses the blending mode.

How can I keep multiply or achieve the same effect in another way?


Source: (StackOverflow)

Get pixel dimensions of a PNG on my Mac?

I have a random .PNG file on my Mac. Actually I have about a hundred of them. What is the easiest way to get the pixel dimensions? (I.e, 100 pixels wide and 50 high, or whatever).


Source: (StackOverflow)

How to create an uncompressed AVI from a series of 1000's of PNG images using FFMPEG

How can I create an uncompressed AVI from a series of 1000's of PNG images using FFMPEG?

I used this command to convert an input.avi file to a series of PNG frames:

ffmpeg -y -i input.avi  -an -vcodec png  -s 1024x768 pic%d.png`

Now I need to know how to make an uncompressed AVI video from all those PNG frames. I tried this:

ffmpeg -i pic%d.png -y -f avi -b 1150 -s 1024x768 -r 29.97 -g 12 -qmin 3 -qmax 13 -ab 224 -ar 44100 -ac 2 test.avi

But the resulting video loses a lot of quality relative to the original AVI.


Source: (StackOverflow)

Photoshop How to save selection to PNG

I have a largish PSD file with a couple of hundred layers, that I would like to extract selected areas from into PNG files.

Areas can consist of a couple of layers.

Being new to Photoshop, I have been using the following workaround. Duplicate needed layers into a new scratch PSD file of same size, TRIM to transparency, Save As PNG, undo TRIM, hide layers, rinse and repeat...

I suppose I could do it without the scratch file and just crop selection, Save As PNG and undo, but there must be a nicer method.

What other ways are there to accomplish this export of a selected area to PNG?

EDIT: This is on Windows Xp running Photoshop CS3 Extended


Source: (StackOverflow)

How to read Fireworks PNG multilayer files without Fireworks

I recieved a couple of Fireworks PNG files. Fireworks has a special format for saving several source images in layers in the png file.

How can I read these without having Fireworks installed?

(im working on a mac but with vmware so any suggestions whatever platform is appreciated)

EDIT: I'd prefer to get a set of copies out of of the layered png. And I prefer if the export be lossless


Source: (StackOverflow)