jpeg

Programmatically Altering Images

I'd like to alter images programmatically. Specifically for the iPhone, but, general answers could help. For example, how could I, programmatically, add filters effects, such as those available in Photoshop. Clearly it is possible as exemplified by apps such as Fat Booth. What is the starting point for this? Load an image as NSData and ...

Problem with loading JPEG file from resources in MFC C++ application

The following code works correctly under Windows XP: CImage image; RECT destRect; int nResource = 10; CResourceStream stream(0, MAKEINTRESOURCE(nResource), _T("JPEG")); HRESULT hr = image.Load(&stream); image.Draw(hDC, destRect); But on Windows 7 image.Load returns E_FAIL though creating CResourceStream reads JPEG file from resou...

Jpgs Extracted From Swf Tags DefineBitsJpeg2 and DefineBitsJpeg3 Using SwfMill are Invalid (Contain Additional Bytes)

I'm getting fairly familiar with understanding the different tag formats and how they work for a swfs but I cam across a particular swf file that I am unable to view/use the extracted images for some reason. Upon further review there is some data in extracted jpgs but I am unsure what this data is. Can someone possibly explain the addit...

Catching error: Corrupt JPEG data: premature end of data segment

When creating an UIImage with corrupt/incomplete JPEG data, the console will print out <Error>: Corrupt JPEG data: premature end of data segment The incomplete image will be shown, with grey filling up the incomplete part. I do not want this to happen. I desperately tried with a try-catch block but it does catch the error. Is there a...

Java library for reading and writing IPTC metadata to JPEG and TIFF

Hello! Does anyone know some opensource Java library for reading and writing IPTC metadata to JPEG and TIFF? Now I'm using Apache Sanselan. Unfortunately, it can only read IPTC, not write (http://commons.apache.org/sanselan/formatsupport.html). Will be very grateful for your assistance. Denis. ...

Image Color Picking Script

I have a bunch of sports team logos. What I want to do is find the color that is used for the highest percentage of pixels. So, for the patriots logo below, I would pick out the blue or #000f47 (white will not be an acceptable color), as this is used for the highest percentage of pixels. Obviously I can eyeball each image, use the col...

Why doesn't my image color match background color in FireFox?

Hi, I think I could be doing something wrong in photoshop. I'm trying to create a banner for my website. I created a new image in photoshop, then filled the background with a color I picked #E06205 I then saved the image as a jpeg. On my webpage, I created a div and gave it a background color background-color:#E05206; When I open th...

How to write EXIF tags (or any other IFD tags) into a JPEG taking into account offsets?...

I was able to successfully parse out EXIF and GPS tags from regular JPEG following the specs, no problem. But... now I need to write some of them back - modified. I know I can use libraries, but I'd rather write something myself. I just need to know what is an established practice of writing those tags, 'cause there are no direct instruc...

Google PageSpeed & ImageMagick JPG compression

Given a user uploaded image, I need to create various thumbnails of it for display on a website. I'm using ImageMagick and trying to make Google PageSpeed happy. Unfortunately, no matter what quality value I specify in the convert command, PageSpeed is still able to suggest compressing the image even further. Note that http://www.imagem...

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...

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...

Faster, more efficient JPEG conversion and compression on the iPhone

I'm grabbing frame images from the iPhone's camera at a rate of 25fps using a resolution of 192 x 144 and a 420v, BGRA format. I'm converting the CVImageBufferRefs into UIImages and then calling UIImageJPEGRepresenation(image, compressionQuality) to get a compressed JPEG version of the image. Using the Time Profiler in Instruments, I c...

Cross-browser incompatibilities in decoding JPEG files?

Something is puzzling me - why does this image appear different in every browser? Image in IE9 (and Windows Photo Viewer): Image in Firefox (and Photoshop): Image in Chrome (and Irfanview): What is going on in their decoding processes of the JPEG to make the eventual output so different? (View it in IE, Firefox, Chrome, etc...

Artistic worm creation

I have a problem, some friends and I are looking for some place we can upload our school design project like this: http://www.freewebs.com/gfxvoidworm/worm.html . Each of those images are uploaded next to eachoter and not as a long single image. How can we upload our different images next to eachother like that without having to merge th...

How do you save a jpeg with 4-2-2 and high quality in .net?

When I save a jpg file using bitmap.save, it saves as jpeg 4-1-1 when I specify the encoder and quality, but as 4-2-2 when I don't. I would like to save it as 4-2-2 with a higher quality than the default. Is that possible using bitmap.save? Do I lose anything by saving with 4-1-1? Dim bmp As Bitmap Dim ep As New EncoderParameters(1) Dim...

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); ?> ...

Best way to scale size of camera picture before saving to SD

Hi, The code below is executed as the jpeg picture callback after TakePicture is called. If I save data to disk, it is a 1280x960 jpeg. I've tried to change the picture size but that's not possible as no smaller size is supported. JPEG is the only available picture format. PictureCallback jpegCallback = new PictureCallback() { publ...

PHP JPEG Crop : Loss of quality?

Hi all, I'm developing a web-to-print, poster printing application. I'm considering using PHP to crop user-uploaded images, and we will ultimately print the PHP-cropped image. My concern is there will be a difference in 'quality' between the original user uploaded image, and image after it is cropped by PHP. Will PHP affect the quali...

How to detect and convert progressive jpegs with python

I'd like to be able to detect progressive jpegs using python and convert them to non progressive. (I'm writing a tool to manage images for android and progressive jpegs seem to break it.) ...

Fast accessing pixel values of jpeg images.

CompVision once again, im working with jpeg images in my application. Just because i'm a bit familiar with MFC and ATL, i used CImage to access pixel values. For my needs i calculate brightness matrix for the image during initialization. Function goes like this(Image is the name of my own class, unimportant, bright is float[][]): voi...