EzDevInfo.com

jpeg interview questions

Top jpeg frequently asked interview questions

OS X: How to perform a lossless crop of a JPEG image?

I'm looking for a simple way to losslessly crop JPEGs on OS X.

Particularly, is there some way to get Preview to perform a lossless crop?


Source: (StackOverflow)

how to change the dpi of an image

I have an jpeg file of 300 dpi. I need to reduce it to 200dpi. How can I do that?

Do I need any specific application or it can be done using Picasa/paint/MS picture manager, if yes how? Thanks


Source: (StackOverflow)

Advertisements

Re-saving JPEG while keeping quality

Sometimes I use XnView's* "batch conversion" tool to downsize a bunch of JPEGs (to maximum of 1600x1200). But some of them are equal or smaller than that and no resizing is done.

Is any image quality lost during the process? (Even if I choose JPEG 100% quality?)

Edit: I was asking about those images which are already smaller than the limit, and are not being resized, just re-compressed.

* My Linux laptop is toast, can't do any imagemagick tricks.


Source: (StackOverflow)

Can we change size of an JPEG image with out decoding and re-encoding it?

I want to convert a 640x480 JPEG image to 320x240. I know it can be done by decoding the JPEG image into raw YCbCr, scale it and re-encode it into JPEG. But is it possible possible with JPEG encoding to directly scale the image with out decoding?


Source: (StackOverflow)

Is there any drawback to just renaming jpeg files to jpg?

A client sent me many jpeg files that I'd like to rename to jpg. Is this just a matter of renaming them, or should I open them with an image editing program and then saving them as jpg?


Source: (StackOverflow)

Losslessly compressing similar images?

I need to reduce the size of my photo library so I naturally want to compress them. Many of them are not quite identical, but still very similar (subsequent shots of the same scene). Is there any compression algorithm that takes advantage of this fact to effectively compress these images? 7zip (LZMA) is useless.


Source: (StackOverflow)

How can I make Windows Paint save by default as JPEG format?

Every time I want to save an image I've pasted into the Paint application,
it chooses a BMP/DIB format (which is the worst for saving things from the clipboard).

How can I hack Paint into defaulting to the JPEG format when saving images?

I am using Windows XP SP3 and Paint 5.1 at the moment. I hope though that any hacks might be generic and I'd be able to use them across all my Windows machines.


Source: (StackOverflow)

Fastest JPEG thumbnail generator for Linux

I'm looking for the fastest command-line image converter for Linux which can read a JPEG image, scale it down to at most 1366x768, and write a quality 50 JPEG image. Something like this, but much faster than ImageMagick:

$ convert -resize x768 -quality 50 foo42.jpg foo42.th.jpg
# takes 0m16.713s for my test image set

I've also tried this:

$ <foo42.jpg djpeg | pnmscale -xysize 1366 768 | cjpeg -quality 50 >foo42.th.jpg
# takes 0m12.007s for my test image set, and has lower visual quality than ImageMagick

So I'd like to have a program, preferably written in C, which integrates djpeg, a higher quality version of pnmscale, and cjpeg.

I've just found swiggle (a C program using libjpeg), I've disabled some of it's functionality I don't need in the source code, and I've got:

$ swiggle -f -H 768 .
# takes 0m11.378s for my test image set, yields high quality results

Do you have another suggestion? I guess most image converters use libjpeg, so it would be hard to get much faster results than swiggle.


Source: (StackOverflow)

How to split a mp4 video into jpg pictures? [duplicate]

This question already has an answer here:

I have a video(with 4 min) in mp4 format(probably MPEG-4) that I need to convert into a lot of pictures(jpg's). I would need to take a lot of Print Screen and paste on MS Paint to manually do that, would be a huge and dispensable work if I have a tool to do that. Does someone knows a good tool to do such thing?


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)

How do I batch convert thousands of NEFs to JPEGs?

I accidentally set my camera (a Nikon D70) to shoot in NEF only and not NEF+JPEG.

Obviously, this will be a major pain when I want to go through them all. I don't envy having to wait for seconds at a time for a single picture to render.

Is there any way I can batch convert the whole set (thousands of pictures) to JPEGs?

I am running Windows 7 and Xubuntu 12.04.


Source: (StackOverflow)

Editing JPEG EXIF properties

How can I edit EXIF properties of JPEG files on a Windows machine?

Some image editing utilities handle the Rotation property wrong, which leaves me needing to make manual edits after rotating images in those utilities. A utility which can perform rotation based on the Rotation property, and then remove the property and save the image, would be handy.

Alternatively, I could rotate images in an image editor and remove the properties manually with some utility.

Rotation is, however, not my only issue; I would like to edit/add other properties as well. What methods/tools will let me do this?


Source: (StackOverflow)

How can one bulk time-shift the creation date of JPG images? (OS X)

I have an unfortunate situation following a vacation. The gist is this: 2 cameras, with Camera #1's clock being two days ahead of Camera #2. Therefore, in (Insert Photo Management Application Here), the photos are interleaved and not in a sensible chronological order. If I could simply move the create date of these images on camera #2 forward enough, then I'll have a fighting chance to actually organize all of these photos.

Anyone share this experience or have any ideas? Thanks!


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 to convert a photo to a black and white image by ImageMagick?

How can I convert a JPEG photo to black and white (not grayscale) image like output of a FAX scanner, by ImageMagick?


Source: (StackOverflow)