jpeg

Proper replacement for usage of the Sun internal com.sun.image.codec.jpeg package?

We have some code kicking around that uses this old internal Sun package for manipulating images, essentially encoding JPEGs to a specific size and quality after reading in / decoding from an inputstream. Code examples below. I would appreciate a best practice replacement example using proper java.* or javax.* APIs. private void encod...

Image GD resize to 100px while keep the ratio

Hay Guys. I was wondering if anyone can help with resizing an image to 100px (wide, or high). While keep it's ratio and quality. All this needs to do is open a given file, resize it and overwrite the file with the new version (keeping the filename). It should only beable to do jpegs,gifs and pngs. I'm not fussed about transparencies...

Are all JPEG files JFIF?

Active Directory can store images in JPEG File Interchange Format (JFIF) according to the jpegPhoto Attribute definition. I'd like to use this but I'd never heard of JFIF. First, are all JPEG files JFIFs? Second, does a WPF JpegBitmapEncoder produce a JFIF file? I guess if the first is true, this will be but if it's not...? ...

cvLoadImage() fails whem loading *.jpg

I am trying to load a JPEG image using the cvLoadImage function and it fails. I get the output "image not loaded" (see the code below). However a window appears but no picture. When trying to load png pictures the cvLoadImage operation is successful, i.e. the picture is presented in a window. Is there a package that I might be missing or...

Streaming Jpeg Resizer

Does anyone know of any code that does streaming Jpeg resizing. What I mean by this is reading a chunk of an image (depending on the original source and destination size this would obviously vary), and resizing it, allowing for lower memory consumption when resizing very large jpegs. Obviously this wouldn't work for progressive jpegs (...

Why do I sometimes get an error in Reporting Services when I export a report containing .jpg images to MS Word

When you create a report using SQL Server Reporting Services 2008 (SP1), that uses .jpg images sometimes you get the following error when you export the report to word. Index was outside the bounds of the array. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace ...

Compressing IplImage to JPEG using libjpeg in OpenCV

Hi everybody. So I have this problem. I have an IplImage that i want to compress to JPEG and do something with it. I use libjpeg. I found a lot of answers "read through examples and docs" and such and did that. And successfully written a function for that. FILE* convert2jpeg(IplImage* frame) { FILE* outstream = NULL; outstream=mallo...

How to convert text to images on the fly?

I have seen in a couple of cases like: Facebook Profile: The E-mail address comes as a jpeg pic and not as text Google Forms Summary: Different Sized, Different Coloured Interactive Barcharts are made on the fly using the data you have. How does it happen? What do I do? ...

Color profile detection in JPEG

I would like to be able to detect the presence of a color profile in JPEG. To be clear: I'm not interested in actually carrying out the color corrections or doing anything else with them. I did some investigation, but I could not find any definite source of information. Here is what I know so far: There is a color profile information ...

check manually for jpeg end of file marker ffd9 (?) in php to catch truncation errors

basically trying to remove corrupt, prematurely ending jpeg files from a collection. i figured if the end of file marker was absent then that meant the image is truncated and therefore i would consider it invalid for my purposes. is this method of checking sound? if so any ideas of how i could implement this in php? cheers ...

How to get the compressed image data from JPEG encoder in Java

I want to compress an image using JPEG encoder and instead of writing it to a file I want to pass the compressed data to another application. My problem is that I can compress the data but don't know how to get that compressed image data. I am using this code : out = new FileOutputStream ( filename ); JPEGImageEncoder encoder = JPEGCo...

Any java library for ppt to jpg conversion?

Hi, Do you know any java library for ppt to jpg conversion? I've tried openoffice3 and POI (http://poi.apache.org/slideshow/quick-guide.html). OpenOffice takes quite long to load (full startup), even though I want to convert the slides only. POI-HSLF only generates images for simple slides (created by myself). all the test slides get...

Accessing raw image data with Snow Leopard

I develop with XCode 3.2 under Snow Leopard, and I want to read a jpg-file from disk into memory and manipulate directly with the raw image bitmap presented as a C char array. How can I achieve this? ...

Security issues in accepting image uploads

What are the major security issues to consider when accepting image uploads, beyond the normal stuff for all HTTP uploads? I'm accepting image uploads, and then showing those images to other users. How should I verify, for example, that the uploaded image is actually a valid image file? Are there any known vulnerabilities in viewers th...

Using jpegtran, jpegoptim, or other jpeg optimization/compression in C#

I've got 100's (maybe 1000's) of products with 10-30 images of each product coming to an online store I've put together. I need to optimize the images' file sizes as much as possible without loosing image quality. I haven't used jpegtran, jpegoptim, or any other jpeg optimizer directly but I have noticed that punypng shrinks file sizes ...

How to know the compress rate of a jpeg image?

Is there any method to know the compress rate of a jpeg image? When I am using photoshop, I can set the compress rate when saving a jpeg image, When I am opening a jpeg image, can I read the compress rate of it? I am using freeimage, c++, however I do not find the API. Many thanks! ...

the size of a jpeg(jfif) image

Hi, I need to find the size of a jpeg (jfif) image. The image is not saved as a stand-alone file, so I can't use GetFileSize or any other API such this one (the image is placed in a stream and no other header is present, except the usual jpeg/jfif header(s). I did some research and found out that JPEG images are composed of different p...

Decoding a JPEG Huffman block (table)

The following block is nested by Huffman block markers -HUFF---------------------------------------------------------------------0084- 10 0 1 2 4 3 4 6 5 6 8 a 9 4 2 3 0 1 2 11 0 3 4 21 5 12 31 6 41 51 61 13 22 71 81 91 a1 14 32 b1 d...

How to get EXIF data from my jpegs?

I have to link a date and a name to some jpegs that I am including in my bundle, or possibly downloading from my own server to the Documents folder. Is there a way to extract EXIF data easily? If so, then I will use EXIF to store this info. If not, then I will have to create a database or flat file that maps my extra data to the ima...

Capture Qt widget as an image file

I'm working with QGLWidget (Qt widget for OpenGL) and want to be able to capture the screen displayed by the widget as JPEG files. How can I achieve this? Is there a function that return what is currently displayed on the widget as an image? ...