JAI can't load jpeg image, premature end of data segment error

Hi,
I have a customer sending in a jpeg image and I tried to use JAI to open the image. But the program throws the following error:
However, I can see the jpeg file on Windows, and open it using Windows Picture/Paint etc software.
Corrupt JPEG data: premature end of data segment
Error: Cannot decode the image for the type :
Occurs in: com.sun.media.jai.opimage.CodecRIFUtil
java.io.IOException: Premature end of input file
     at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
     at com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImageDecoder.java:48)
     at com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
     at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:43)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
     at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
     at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
     at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
     at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:102)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
     at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
     at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
     at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
     at com.sun.media.jai.opimage.FileLoadRIF.create(FileLoadRIF.java:144)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
     at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
     at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
     at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
     at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
     at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:770)
PlanarImage image = img.createInstance();
Thanks a lot for the help,

I'm having this issue too - did you find any more information on this?

Similar Messages

  • Corrupt JPEG Data: Premature End of Data Segment

    I've searched and searched this error for ever and everyone
    says remove images from folders (an option i do not have), and no
    one seems to have error i have.
    I need to find out how to remove this error, it causes me
    endless grief, stops my uploads (sometimes it comes up in the
    middle of an upload), sometimes shows up behind dreamweaver, so i
    don't see it.
    Help
    I'm using Dreamweaver 8.01 (govt office, can't easily
    upgrade).
    on XP PRO Sp2
    if any other specs are needed, pls let me know.
    thank you.

    You are not the only one. I'm dealing with the same issue. I
    did you ever get an anwer anywhere?
    Thanks,
    Doug Collins

  • Why You Can't Load Some Images On Your 5th Generation ipod

    Why You Can't Load some images on your 5th Gen ipod.
    - OK here is the scoop: I could not load some images on my 5th gen ipod and yet other images would load no problemo. Images were JPEG, jpg, PSD (all approved image types for the 5th gen ipod)
    - After doing several tests like restoring the software on the ipod, reinstalling itunes I still could not find the problem, then I noticed as soon as I would open an image in Photoshop CS2/CS3 that was otherwise loading on the ipod no problemo, when I would save that same image in Photoshop the image would not load in my ipod.
    - So after playing with several settings in Photoshop I found the problem:
    -In Photoshop go to File handling:
    -Image Previews:
    - And click on:Never Save
    You do not want to save a photo with a "Image Preview" when saving any file type that you want to load on your 5th gen ipod. it would seem the ipod will not accept any images with a "Image Preview" embedded into the file, JPEG, PSD, jpg etc.
    I hope this will help some of you because I just waisted a whole day to find this out the hard way.
    Cheers,
    Mac Fans
    BTW I use a Mac Pro/Intel OSX Tiger 10.4.9

    Also I just found out when you are saving an image in Photoshop uncheck the " Embed Color Profile" box.
    So do not embed your images with a "Preview" and DO NOT embed a "Color Profile" when saving images in Photoshop or the images MAY not load on your ipod.
    Have Fun
    Message was edited by: MacPro77

  • On CS5, how can I recover jpeg images that were Batch Renamed prior to removal from my flashcard?

    On CS5, how can you recover JPEG images that were accidentally Batch Renamed prior to removal from a flash card? Is it a total lose or can they be saved somehow?

    If they were renamed on the flash card that is a poor practice.  If renamed in Bridge the old names can be recovered it you have checked "preserve original name in XMP".  If not you are out of luck.  But you still have the images correct?

  • Sometimes I can't open JPEG image

    i use nokia 5310 and i can't open JPEG image sometimes, it says "Not Enough Memory"..
    why is that? and what's the solution?
    hope somebody can help me with this problem..
    thanks..

    you need to free up the phones memory so delete your text inbox /outbox/sent folders then move images and videos to the memory card and also delete unwanted items
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • I've transferred photos to my ipod classic from my laptop. But how can I transfer JPEG images to ipod?

    I've transferred photos to my ipod classic from my laptop. But how can I transfer JPEG images to ipod?

    Hello, Blondet787. 
    JPEG photos are compatible with your device.  As long as these images are in the same folder as your pictures, then they should sync.  Below, I have included a couple articles that show you how to sync this data to your iPod.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    The article below is a little more detailed and designed more as a storage solution for media on your iPod Classic. 
    Putting iPod into Disk Mode
    http://support.apple.com/kb/ht1363
    Cheers,
    Jason H.

  • Can't load App Store on my macBook Pro.  Error is; You cannont open the application "App Store" because it is not supported on this system.  How can I upgrade App Store or download new version?

    Can't load App Store on my macBook Pro.  Error is; You cannont open the application "App Store" because it is not supported on this system.  How can I upgrade App Store or download new version?

    Problem now resolved as I upgraded to Snow Leopard 10.6.  Seems App Store doesn't like anything previous to 10.6.

  • Display incomplete image: Premature end of JPEG file

    Hello people,
    My problem is that displaying an image with incomplete data works fine, apart from that the following error message is printed out: Premature end of JPEG file
    The picture looks perfect (the missing part is rendered in gray), but I want to get rid of the error message.
    //init
    File jpegFile = new File("picture.jpg");
    FileInputStream inputStream = new FileInputStream(jpegFile);
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    //step 1: downloading the image
    byte buffer[] = new byte[bufferSize];
    int bytesRead;
    while( bytesRead = input.read( buffer ) ) >= 0 )
            output.write( buffer, 0, bytesRead );
    //step 2: create (and display) incomplete image (download not finished yet)
    byte byteArray[] = outputStream.toByteArray();
    Image img = Toolkit.getDefaultToolkit().createImage( byteArray );Thanks for help,
    Martin

    Recreate the JPG image in your graphics editor - it is
    corrupted.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "wuest" <[email protected]> wrote in message
    news:e20uth$pme$[email protected]..
    > Have just used the assets panel for the first time...
    tried to create a
    > template... an image showed up and then this unending
    message kept
    > appearing
    > ... "premature end of jpeg file" and no matter how many
    times you click it
    > stil
    > keeps reappearing... please, can someone put me out of
    my misery?
    >
    > thanks.
    >

  • How to load jpeg images in database?

    I have an employees panel and it has a box to show employee's picture. Normally I double click on the box and it takes me to the folder where I have stored all employees jpeg file. I click on the one I need and then insert, it shows up on the panel and also saving the data in a table called PS_EMPLOYEE_IMAGE table.
    If I want to insert number of images at one time thru the back end like sqlplus is there a way to do it? This saves me lot of time instead of entering thru the panel. Can it be done? For example fot employee1 insert jpeg1, employee2 jpeg2 etc. DO I have to use any tool to convert these jpeg files into some other data and then insert it? Is there any pl/sql package to do it?. If some one can explain me with simple explanation I really appreciate as I am not an real oracle person. Googling for this issue says it can be done but it is not very clear in steps of doing it.

    Thanks for your help. I did exactly like what you described (see below)
    1) I created a image_file.txt file as shown below
    EMPLID|EFFDT|EFF_STATUS|IMAGE_FILE
    100000|08-FEB-2011|A|H:\SQL_Loader\George_Test.jpg
    100001|08-FEB-2011|A|H:\SQL_Loader\Eftihia_Test.jpg
    2) Then created EE_Image_Tbl.ctl file as shown below.
    OPTIONS (DIRECT=TRUE, SKIP=1)
    UNRECOVERABLE
    LOAD DATA
    APPEND
    INTO TABLE PS_EMPLOYEE_IMAGE
    FIELDS TERMINATED BY '|'
    (EMPLID
    ,EFFDT
    ,EFF_STATUS
    ,IMAGE_FILE FILLER CHAR(80)
    ,EE_IMAGE LOBFILE(IMAGE_FILE) TERMINATED BY EOF)
    3) then used the sql loader (load_ee_image.sql)
    $ sqlldr DH5M/ep5evs1@KDH5MI01 control=h:\sql_loader\EE_Image_Tbl.ctl log=h:\sql_loader\load_ee_image.log data=h:\sql_loader\image_file.txt
    SQL> --*
    SQL> commit;
    Commit complete.
    SQL> --*
    SQL> @h:\sql_loader\load_ee_image.sql;
    SQL> $ sqlldr DH5M/ep5evs1@KDH5MI01 control=h:\sql_loader\EE_Image_Tbl.ctl log=h:\sql_loader\load_ee_image.log data=h:\sql_loader\image_file.txt
    SQL> --*
    SQL> --*
    SQL> --*
    SQL> commit;
    Commit complete.
    SQL> --rollback;
    SQL> --*
    SQL> spool off
    L
    Number to skip: 1
    Errors allowed: 50
    Continuation: none specified
    Path used: Direct
    Load is UNRECOVERABLE; invalidation redo is produced.
    Table PS_EMPLOYEE_IMAGE, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    EMPLID FIRST * | CHARACTER
    EFFDT NEXT * | CHARACTER
    EFF_STATUS NEXT * | CHARACTER
    IMAGE_FILE NEXT 80 | CHARACTER
    (FILLER FIELD)
    EE_IMAGE DERIVED * EOF CHARACTER
    Dynamic LOBFILE. Filename in field IMAGE_FILE
    SQL*Loader-418: Bad datafile datatype for column EE_IMAGE
    This is becasue my image datatype can be declared as LONG RAW dara type thru my application.
    When I created a table with image datatype as BLOB it worked.
    But I want to insert into the existing table where image is declared as LONG RAW. How to insert jpeg into this field. Do I have to convert anything? Thx.
    Edited by: user5846372 on Feb 8, 2011 1:18 PM
    Edited by: user5846372 on Feb 8, 2011 2:16 PM

  • How to load .jpeg images dynamically

    Hi all,
    I am only perfect with basics of AS3 and flash. I need AS3
    code or a basic example/tutorial for loading of .jpeg images into
    flash from database.I had searched through google, but, any of the
    example won't match.
    Please, If anyone has their ideas, atleast send me the
    algorithm for your idea, so that i can try by implementing the
    idea.
    I think, once again when I open this topic, i will be
    getting my requirement.
    Thanks a lot in advance. Reply me soon.. It is urgent..
    Srihari.Ch

    The loading is easy:
    var l:Loader = new Loader();
    l.load( new URLRequest( "
    http://www.adobe.com/devnet/images/214x74/adc_lockup.jpg"
    addChild( l )
    But the database part, well... what kind of database did you
    have in mind?
    Store the images on disk and just have their path in the
    database or have the images as blob in the database. Are you
    looking for serverside script and SQL aswell? It's a question with
    a lot of different answers...

  • I can't open jpeg images. Is there an encryption setting?

    I am trying to view a jpeg image sent to my email on my iphone from a remote computer. The images will not appear. Is there an encryption setting?

    I am not familiar with this app, but I have never had any trouble with jpegs and email. What email client are you using the send the file? Are you using HTML or plain text in your email? Is Mime activated? Arre you attaching the file, or pasting it in the body of the email? When you check the email, is it completely downloaded? If you scroll to the bottom of the email, does it show that it is fully downloaded? In the mail settings, is Load Remote Images on?
    Have you done any troubleshooting on the phone? Standard user troubleshooting includes restart (powering off/on), reset (holding the sleep/wake and home buttons together until you see the Apple logo and then release), restore from backup and if needed, restore as a new device.
    Again, have you ever received a jpeg from anyone in mail and been able to see it? Can you try from a different mail client and see if it works?

  • How can I insert jpeg images into a PDF's Header and Footer?

    International Clients send me a lot of pdf price lists (hundreds).  I want to be able to easily add our letterhead header and footer jpegs to my Acrobat one time so that I can then have them easily placed and printed on each new original document I receive when I (re)print them as a new (compressed) pdf.   This will streamline my work so that when I send them out and they start circulating among Buyers they can clearly see that we are the US contact for XYZ Client?
    Thank you.

    If you add a background or water mark, as opposed to a footer/header, you can specify an image to use.
    You can also use JavaScript to add a custom toolbar button or menu item so that you can easily add the images to a documant, or even in a batch process, using a variety of methods. Post again if you'd like more information.

  • Can't import JPEG image Unrecognized format

    Can't import black and white JPEG to iPhoto. Says unrecognized format. I've imported many black and white JPEG images.

    You didn't ask a question.  You must made some statements.
    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    where are the photos from?
    what fixes have you tried?
    where is your library located?
    did you apply any updates or upgrades just prior to the problem occurring?
    are you running a "managed" or "referenced" library?
    OT

  • How can i load a image into a midlet?

    Hi, i placed the png file together wif the midlet in the src directory.
    Image img = Image.createImage("title.png");
    I tried the above code but when i try to load the image in got this error
    Failed loading image.
    anione can help?

    just place your file in /res/ directory not in /src/

  • Can't open jpeg image

    I'm using Adobe photoshop 7.0 and usually when I open a jpeg image it just opens but some jpeg images don't open properly. There is this jpeg image that when I try to open it it either displays an error message that it's not the right kind of file or brings up a dialog box as if I'm trying to open a new custom blank page and asks me what size, transparency etc. and no matter what I select it always opens a blank page and I could not actually see the image that's supposed to be there. In any other program it will open normally and display as a normal jpeg image in picture viewer or GIMP image editor but oddly won't open in Adobe Photoshop. I tried to open the same file in GIMP image editor and it opens the file but when I try to save the file, strangely it advises me to export the file before saving it. I believe that the jpeg file may have invisible layers that photoshop can't handle but I could not get rid of the layers properly. I've tried to flatten the image and export the file to a normal jpeg file and delete all invisible layers but even after all this, when I save it as a normal jpeg file and open it again in adobe photoshop it still can't open the file. Does anyone know how I can force the program to display the image and or permanently get rid of the weird layers or markers that has been preventing this file from opening in Adobe Photoshop?

    Thank you for your assistance Nancy. Your process almost completely worked. The exception is that when I tried to copy the image from an webpage such as Firefox (I do not have internet explorer), it was not getting through to the Adobe Photoshop clipboard and therefore could not be pasted. However, I simply saved the image from a Firefox window as a different file name and that solved the problem. Now the copied image can be opened in Adobe Photoshop. Thank you for your help.
    sincerely,
    Jon

Maybe you are looking for