How can I convert an image created in Photoshop into a format that Java's ImageIO library will take?

Hi all,
I've been trying to write an image resize tool to use the Lancoz resample algorithm to resize images to a high standard in Java.  The library with the algorithm/filter in it is mortennobel's image scaling library and it takes a buffered image as an input and returns the resized image as desired.  However the trouble I’m having is that the ImageIO library in Java, a standard library, which converts images given to its read method to buffered images doesn't accept certain images created in Photoshop and so it throws an exception.  My library needs to be fully automated to process possible thousands of images at a time and so manually converting them by resaving them as JPEG's is really feasibly.  Is there some way I can convert these images from Adobes Exif format to standard JFIF format?  I've tried simple inserting the APP0 marker from a JFIF image in-between the SOI and APP1 marker but the ImageIO library still failed.
The above image is a screenshot of the binary in hex of one of the images that cause an Invalid Format exception when passed to ImageIO.
Any help you could offer me with this would be much appreciated.
Kind regards and thank you,
Alexei Blue
Science Warehouse.
NB: I previously posted this post in Developers but was told to post it in a Photoshop forum so apologies if this is the incorrect formum

The image scaling library does have a BiCubicFilter in it so I'll experiment around with them and see what happens.  As for the imageIO library I think it accepts Exif image types, but still for some reason it just doesn't like Adobe Photoshop types.  Maybe its the colour map it doesn't like I just can't seem to work out what's wrong which is slightly frustrating but looking round to see if I can find an answer

Similar Messages

  • How can i convert a window media player file into a format playable on ipod

    hey guys can you tell me how can i convert an widdow media player file into a format that can be played on my ipod, i used videora ipod converter but it can't convert the window media player file

    the program you show change wma to mp3, but the mp3 file can't be understanded by the iPod, how can i change a wma file to a format understanded by the Ipod?

  • How can I convert all of my iTunes files into mp3.format?

    These are songs that I downloaded from my cds, but I want to be able to put them back on my desktop in MP3 format to put on a non-itunes compatible portable music player. Thanks!

    Set iTunes Preferences Advanced Import to MP3
    Select all the tracks you're referring to
    CTRL-Click onto this selection - "Convert to MP3"
    After that you may want to delete the non-MP3 source files

  • How can I convert an Image ( or BufferedImage ) to Base64 format ?

    Hi folks...
    How can I convert an Image, or BufferedImage, to the Base64 format ?
    The image that I want to convert, I get from the webCam connected to the computer...
    Anyone can help me ?
    Rodrigo Kerkhoff

    I suggest you read this thread concerning this:
    http://forum.java.sun.com/thread.jspa?forumID=31&threadID=477461
    Failing that, Google is your friend.
    Good luck!

  • How can i convert a quick time movie file to a cd that will play in a car stereo?

    how can i convert a quick time movie file to a cd that will play in a car stereo?

    In quicktime, I would try File -> Export -> Audio. It will create an audio file. Then drop it onto your playlist into  iTunes. Burn the list from itunes with File -> Burn to disk    and then select Audio CD.
    If you have Quicktime  7 it should be easier and export to AIFF directly

  • How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software.

    How can I convert my Open Source document files into Word document files? I cannot download Pages since my Macbook Air does not have the most recent software. I downloaded open office to my mac to try and save money. It worked well for a while. Now I get this pop-up message that asks me to "Reopen" and when I select the option, nothing happens. I cannot save my documents anymore and I cannot convert them to word. Help!

    dwb wrote:
    Does OpenOffice output Word documents by default or do you have to select it manually?
    You have 17 options to save as in Open Office, one of which is .doc  files,  yes it needs to be saved manually.
    You may be able to default to DOC, but have not tried same.
    Since Open Office is 99% same as Word, I use it, or Word, either one.  Open Office is a bit less buggy than Word 11'

  • How can I Convert a TeamViewer .tvs recording to other video formats?

    How can I convert a TeamViewer .tvs recording to other video formats in OSX v 10.9?

    This feature does not seem to be implemented in the Mac version.
    You'll have to convert the file using TeamViewer on Windows ;(

  • How can I convert an AUDIO MPEG-4 to an MPEG3 format? I need it for a Powerpoint Presentation

    How can I convert an AUDIO  MPEG-4 to another type of file, such as MPEG3  or mp3

    Use Handbrake.
    You can download it for free from this site:
    http://www.macupdate.com/info.php/id/12987/handbrake
    Good luck

  • How can I convert the ITHMB photo files to PC readable format like JPEG?

    How can I convert the ITHMB photo files on my new Iphone 4s to a PC readable format like JPEG

    Look at the link and follow instructions to convert the file taken from a different thread in this forum:
    https://discussions.apple.com/thread/2640386?start=0&tstart=0

  • How can you convert an image to ydbr format?

    Hello all. I can not work out how to simply input an image and convert it to ycbr and save it as a new image.
    Can anyone help please?
    Kind Regards

    OK I have also found this code:
    public static void rgb2ycbcr(int r, int g, int b, int[] ycbcr) {
              int y = (int)( 0.299 * r + 0.587 * g + 0.114 * b);
              int cb = (int)(-0.16874 * r - 0.33126 * g + 0.50000 * b);
              int cr = (int)( 0.50000 * r - 0.41869 * g - 0.08131 * b);
              ycbcr[0] = y;
              ycbcr[1] = cb;
              ycbcr[2] = cr;
    However I have no idea of how to use it. The source did not specify what all the parameters are. How can I use this in my code from a bufferedimage to displaying the new image?
    Thanks again.
    Looking forward to your answers (3 more Dukes added)

  • How can i convert an image into gif file as jpeg by using com.sun.image.*

    please help me to convert an image into gif format. i have used sun's impl com.sun.image.code.jpeg package to convert a buffered image into a jpeg file. is there any implementatioln available from sun to handle gif files.

    Many. Try for instance google with 'java image encoders'. Go to the URL http://www.google.com/search?q=java+image+encoders and be amazed of the wonders of modern web search tools.

  • How can I convert an array with varying length into a cluster

    Hi,
    I need to convert an array of n elements into a cluster. Usually, it only involves the "Array to Cluster" function. But since the array length is not constant and the number of elements in the function is constant and can not be changed programaticaly, I need to find another way to do that.
    Any ideas?
    Thanks.

    Hi,
    I also tried to do this but without success. I think that's not possible.
    For me it's a general problem using labview. I often wanted to generate standard controls dynamically which is not possible (or I haven't found the solution yet). So I think that's the reason why you can't create a cluster during runtime (the program would have to add controls dynamically to the cluster).
    Do you have an upper limit for your array-size? Although it needs a lot more memory, it would be a possibility to create the cluster with the maximum number of elements.
    If you don't have a maximum, you will have to look for another way, I'm afraid.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How should i convert any image, audio and video into binary?

    I am going to prepare a Steganographer Software Using java.
    I want a code to convert any Image , audio and video files into binary structure.
    I am having very short time to accomlish my project, so please reply as early as possible.

    It's already binary.

  • How can I set the movies I have put into itunes so that they do not sync each time I try to sync new music purchaes?

    I can uncheck tv shows and when I sync music or app purchase the tv shows do not sync unless they are marked us unwatched.  I have put digital copies of some blu-rays into itunes and I cannot get them to be in itunes without syncing when sync new purchases.  How can I keep the movies in itunes for storage but keep them from going to the device and taking up memory when I am not needing them?

    Just untick Sync Movies or change the drop down below to selected movies.
    tt2

  • How can I fix an image created by Focus Stacking in PS6

    The below image was created using 8 photos using the Focus Stacking process in PS6 (I have carried it our correctly) but it doesn't like up properly when blended together. I have tried it about 8 times and get the same result every time.
    Is there anyway I can fix this photograph so that it is all in alignment?
    See around the 3 and 9 positions it is out of alignment.
    Expert help would be greatly appreciated.

    Thank you for your assistance in this matter.
    This has been frustrating the crap out of me for the last week (not that the photo is important, it is just that I like to conquer and solve this types of issues)
    I was shooting with an aperture of 7.1. 
    I changed the exposure on the photos as you had done previously but this only blew out the watch and I couldn't recover it afterwards and the alignment was no better any way.  So then I started experimenting as you suggested, and I don't know if what I am about to write is acceptable in an Adobe forum, but here goes.
    I tried Helicon Focus and it was terrible, but I must admit I didn't know how to really use it, it doesn't seem to have any alignment function and is very difficult to try to use and understand.
    then I tried Hugin and I am not even sure if this is image stacking software or just an alignment software, anyway that didn't work either and kept saying the output was a very bad match.
    THEN I downloaded and tried zerestacker (free 30 day trial)  (after reading about it in a google search) and WOW, it worked amazing, see below photo, it was so easy to use and the interface is easy as well and it does the alignment and stacking in the same process and you can see the image output show up on the left of the screen.  Sorry PS but I will be using ZS for photostacking from now on. Adobe need to buy this company and incorporate it in to PS CC6.
    This is just so much better than anything I got out of PS, there is no ghosting or blurring and the alignment is perfect and it is so simple to use.

Maybe you are looking for

  • Como receber meu número de série para Creative Cloud?

    Olá boa tarde a todos, I DON`T SPEAK ENGLISH. Comprei a Creative Cloud para fotógrafos, dia 30/09/2014. Até hoje, dia 11/11 não recebi um número de série para os produtos Photoshop CC e Lightroom CC. Gostaria de saber como proceder, uma vez que o sup

  • Video Files Not Working in QuickTime

    I'm trying to play an MPEG-4 file on QuickTime, but keep getting an error saying that the file has invalid data. Normally, I would think that the file is simply corrupt, but it plays on Windows Media Classic perfectly. Any suggestions?

  • HTML and JS in Adobe Muse is slow to load?

    Hi, I've embedded an Edge Animation into Muse by inserting the HTML and uploading the Javascript using a MuCow widget provided by Adobe. 'LoadJSAtBodyEnd.mucow' The animation takes a very long time to load? 11 seconds in Safari, 20 seconds in Firefox

  • Detailed Query Runtime Statistics - Substeps of Data manager Event

    Dear All, I am using the report for 0TCT_MC02_Q0200 to analyse the Detailed Query Runtime Statistics. The report shows that the Event 9000 (Data manager Event) took a time of 109 seconds. I would like to know as to what does the 9000 Data Manager Eve

  • Textarea - create String that acts like a single character

    Hi guys, I am trying to create a string in a textarea that acts like a single character. By this, I mean that the user cannot edit the contents of that section of text. Here's an example: Textarea text: [Number of Iterations] * 35 / 200 I want the [N