JPEG file reading wierd bug using ImageIO.read and buffer strategy

OK I have a slightly (!) bizzare problem. I have a program in Java 1.5.0 /5.0 which is fundamentally using a full screen exclusive mode window to display images loaded from files using ImageIO.read(file). I am getting the graphics context of the buffer strategy used on the FSEM window, and then drawing onto that the image that I have loaded using graphics.drawImage(ImageObj, 0,0, null).
Now ordinarily this works fine, but I have (after much head scratching) discovered that certain specific jpeg images cause me problems. If I load one of these jpeg images, then it loads in with ImageIO.read fine and I get no errors, but the program locks up on the drawImage(ImageObj, 0,0,null) command in the rendering engine. It doesn't crash, but the CPU usage goes to 100% and stays there, and the method never returns. The image is never displayed on screen obviously, as the program never gets to call bufferStrategy.show() for these images. I have to forcibly terminate the VM to get out of the program.
Does anyone know what is going on here? Is there some extraneous meta data in the dodgy jpeg files that is doing this? I don't know what 'extras' you can have stored on a jpeg that would cause this behaviour, and I don't know what restrictions there are in the jpeg file reader in Java.
Its not a major bother to me (now I figured out whats causing it!), as I can just resave a duff jpeg in my image editing app and it will work fine. I just don't know whether I should submit it as a bug or not, and also I thought it would be useful for others to know of this strange behaviour - if I had known about it I would have saved myself about 8 hours!
Thanks
Alex

Oh I forgot to add - I am resizing the images to the screen size using
Image.getScaledInstance(deviceBounds.width,
deviceBounds.height,
Image.SCALE_AREA_AVERAGING);
and then drawing the scaled image onto the graphics context.

Similar Messages

  • Unable to open in pdf files in ipad 3 using adobe reader 10.2 but able to do so in ipad 2 using adob

    Unable to open in pdf files in ipad 3 using adobe reader 10.2 but able to do so in ipad 2 using  adobe reader x 10.1 .

    Can you please share the file you are trying to open with us at [email protected]? Also, can you please confirm that you've updated the Adobe Reader on your iPad 3 to the latest version using iTunes or the AppStore app?

  • I received an email containing pdf files. I am using Adobe Reader Touch for Windows 8. File doesn't open

    I received an email containing pdf files. I am using Adobe Reader Touch for Windows 8. File doesn't open. I am a new user to Windows 8.

    The full featured Reader for Windows 8 is Reader XI.
    Reader Touch works in all Windows 8 systems BUT it is intended mainly for use in mobile tablets - I see no particular reason to use it unless you can'r run Reader XI. Given it is mainly for use on mobile that can't use Flash, we aren't likely to ever see the development team spending their time on this.
    If you want the latest and greatest - at least try Reader XI, not X! (Flash is a separate download, it will prompt).

  • Reading colour image using raster object and getsample() method

    Hello all,
    I am trying to read a grey image using this code below and it perfectly works:
    File filename = new File("myimage.jpg");
    BufferedImage inputimage = ImageIO.read(filename);
    Raster input = inputimage.getRaster();
    double pixelvalue = input.getSample(xx, yy, 0) ; // to read pixel colour.
    Now:
    what modifications should i do to read a colour image using getsample() method.
    any help, by example if y would.
    Thanks

    The code below
    double pixelvalue = input.getSample(xx, yy, 0) ; // to read pixel colour.actually doesn't obtain the pixel color. It reads a band of the specified pixel. If you are reading a tripple band image (24-bit colored image RGB ) then you have to invoke this method three times for band 0, 1 and 2. The arrangment of them depends on the BufferedImage type.
    In reply of your question, you can use getSamples method, refer to the java API documentation of the BufferedImage class for more info.
    you can also check methods getRGB and setRGB, they used to get/set the entire pixel in range of 0x00000000 to 0x00FFFFFF ( 0x00RRGGBB of image type TYPE_INT_RGB )
    Regards,
    Mohammed M Saleem

  • Bridge CS6 Mac XMP File Info Panel Bug: can't copy and paste metadata

    The cmd-keys / shortcuts doesn't work in the xmp file info panel btw. in the xmp / iptc fields (e.g. cmd+c, cmd+v, ...) of Adobe Bridge CS6 (Mac OS 10.6.8 and 10.7.3). You are not able to cut and paste info from one box to another like previous versions.
    This bug only appears in the xmp file info window (opened via alt+i) in Bridge CS6 - if you edit information or metadata in the file info panel in Photoshop CS6 copy and paste from one field to another works.
    The shortcuts also work under Windows (tested under Vista).
    I noticed this minor bug already one in the Photoshop CS6 Beta more than one months ago. I hoped that this was corrected in the official test version, but unfortunately it is not. Although it is a minor bug, it is IMHO a basic function and would be very helpful in my daily work - it is too bad, that such a small thing is making working with the application a little bit annoying.

    Thanks! If there is a workaround or simple solution, I would be very glad if you could inform me.
    Christian
    (signature removed by the Admin)
    Am 14.05.2012 um 13:49 schrieb FrankBiederich:
    Re: Bridge CS6 Mac XMP File Info Panel Bug: can't copy and paste metadata
    created by FrankBiederich in XMP SDK - View the full discussion
    Thanks for your report; we'll look into it.
    Frank
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Re: Bridge CS6 Mac XMP File Info Panel Bug: can't copy and paste metadata
    To unsubscribe from this thread, please visit the message page at Re: Bridge CS6 Mac XMP File Info Panel Bug: can't copy and paste metadata. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in XMP SDK by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.
    Message was edited by: Arpit Kapoor

  • Corrupted images using ImageIO.read.

    I have looked around and it seems to be a lot of confusion about the point that the corruption occurs. After trying a lot of thing I simplified it to the following code:
    final BufferedImage bimg = ImageIO.read(file);
    JComponent mC = new JComponent() {
    public void paint(Graphics c) {
    c.drawImage(bimg, 0, 0, null, null);
    super.paint(c);
    JFrame ff = new JFrame(file.getName());
    ff.add(mC);
    ff.setVisible(true);
    ff.pack();
    ff.setSize(800, 600);
    ff.validate();Which as I understand means that the corruption happens at read time.
    #Image formats:gif,jpeg
    #Result:
    Some read ok
    Some read half ok/half corrupted (top screen ok/bottom corrupted)
    Some read with overlaying corruption (ie. the image layers are out of place)
    #JVM
    1.4.2
    Java 6 (latest as of 8/6/2007)
    #IDE
    RAD (IBM Eclipse)
    Thank you

    Consider this closed for now. Big portion of my data was corrupted on load time.
    Cheers

  • Copy jpeg file to CF card to be read by 7D.

    How do I copy any jpeg file back to a CF card such that it can be read by my 7D.

    You need to export the file using zoombowser or imagebrowser - it's just about the only way.
    Canon USA uses the same approach to put their digital learning centre videos on the cameras.
    http://www.learn.usa.canon.com/galleries/galleries/tutorials/eos_7d_tutorials.shtml
    There's a PDF guide explaining how to do videos here http://downloads.canon.com/CDLC/EOS7D_on-camera_instructions.pdf same applies for stills I recall.
    Brian / p4pictures
    Canon specialist trainer, author and photographer - http://www.p4pictures.com

  • "can't load because some files are already in use" - Adobe reader!  How do i close whatever i can't find that they say is in use!?

    Can anyone help me get Adobe reader 11 installed??? The error message when I'm practically done says the file can't be loaded because some files are already in use - and it refers to Adobe reader!  What do I do to get past this??? Help!  I need to install adobe!
    I had been having a problem after I tried to do an adobe update, so i deleted and tried to reinstall the program and it won't let me ! Any suggestions???

    Hi Jody414,
    Use the Acrobat Cleaner tool ( Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs ) to remove Reader completely from the machine.
    Download Reader 11 from: Adobe - Adobe Reader Distribution   and install and check.
    Regards,
    Rave

  • Reading SNMP packet using PL/SQL and XML

    Hi,
    Is it possible to read the content of a SNMP packet using MIB file converted into XML. I know it's possible to develop a java program which can collect SNMP packets from the network and inserts them into Oracle. The problem after that is how to read the content using MIB library file. It's possible to convert the MIB file into XML file but the problem is to create s PL/SQL block which can read the XML file and based on the content to translate the information from the SNMP packet. Is it possible?
    regards
    Edited by: user10484841 on Sep 24, 2010 3:15 AM

    Thank you for the reply!
    I have converted oracle MIB into xml using prtg's import tool. As far as I see prtg also uses xml as you can see below.
    So how I can translate string for example 1.3.6.1.2.1.39.1.1.1.1.1111111111 using xml and pl/sql?
    Can you give me direction where to start?
    <?xml version="1.0" encoding="ISO8859-1" ?>
    <oidlist>
    <system>
    <version>
    1
    </version>
    </system>
    <list>
    <entry>
    <name>
    RDBMS-MIB|rdbms db: #[1.3.6.1.2.1.39.1.1.1.1]|rdbms db index
    </name>
    <oid>
    1.3.6.1.2.1.39.1.1.1.1
    </oid>
    <type>
    vmAbsolute
    </type>
    <kind>
    mkTable
    </kind>
    <unittype>
    sutCustom
    </unittype>
    <units>
    </units>
    <indicator>
    rdbms db index
    </indicator>
    <scale>
    1
    </scale>
    <multiply>
    no
    </multiply>
    <max>
    0
    </max>
    <usegetnext>
    no
    </usegetnext>
    <is64bit>
    no
    </is64bit>
    <isunsigned>
    no
    </isunsigned>
    <isfloat>
    no
    </isfloat>
    <description>
    A numeric index, unique among all the databases from all products on this host. This value is a surrogate for the conceptually unique key, which is {PrivateMibOID, databasename}
    </description>
    </entry>
    <entry>
    <name>
    RDBMS-MIB|rdbms db info: #[1.3.6.1.2.1.39.1.1.1.3]|rdbms db info size units
    </name>
    <oid>
    1.3.6.1.2.1.39.1.2.1.3
    </oid>
    <type>
    vmAbsolute
    </type>
    <kind>
    mkTable
    </kind>
    <unittype>
    sutCustom
    </unittype>
    <units>
    </units>
    <indicator>
    rdbms db info size units
    </indicator>
    <scale>
    1
    </scale>
    <multiply>
    no
    </multiply>
    <max>
    0
    </max>
    <usegetnext>
    no
    </usegetnext>
    <is64bit>
    no
    </is64bit>
    <isunsigned>
    no
    </isunsigned>
    <isfloat>
    no
    </isfloat>
    <description>
    Identification of the units used to measure the size of this database in rdbmsDbInfoSizeAllocated and rdbmsDbInfoSizeUsed. bytes(1) indicates ndividual bytes, kbytes(2) indicates units of kilobytes, mbytes(3) indicates units of megabytes, gbytes(4) indicates units of gigabytes, and tbytes(5) indicates units of terabytes. All are binary multiples -- 1K = 1024. If writable, changes here are reflected in the get values of the associated objects.
    </description>
    </entry>
    <entry>
    <name>
    RDBMS-MIB|rdbms db info: #[1.3.6.1.2.1.39.1.1.1.3]| rdbms db info size allocated
    </name>
    <oid>
    1.3.6.1.2.1.39.1.2.1.4
    </oid>
    <type>
    vmAbsolute
    </type>
    <kind>
    mkTable
    </kind>
    <unittype>
    sutCustom
    </unittype>
    <units>
    </units>
    <indicator>
    rdbms db info size allocated
    </indicator>
    <scale>
    1
    </scale>
    <multiply>
    no
    </multiply>
    <max>
    0
    </max>
    <usegetnext>
    no
    </usegetnext>
    <is64bit>
    no
    </is64bit>
    <isunsigned>
    no
    </isunsigned>
    <isfloat>
    no
    </isfloat>
    <description>
    The estimated size of this database (in rdbmsDbInfoSizeUnits), which is the disk space that has been allocated to it and is no longer available to sers on this host. rdbmsDbInfoSize does not necessarily indicate the amount of space actually in use for database data. Some databases may support extending allocated size, and others may not. Note that a compliant agent does not need to allow write access to this object.
    </description>
    </entry>
    </list>
    </oidlist>
    *Note that the xml file is not full die to 30000 character restriction of oracle's forum
    regards
    Edited by: user10484841 on Oct 19, 2010 6:07 PM
    Edited by: user10484841 on Oct 19, 2010 6:07 PM

  • File to Proxy Scenario using ABAP Class and DB Multi Connect

    Hello Friends,
    I have a scenario below and a proposed solution. I would like some input as to whether i am headed the right way.
    Scenario: Thousands of records come in from the legacy accounting system. The fields of these records need to be mapped to SAP fields using cross-reference tables stored in DB2. Finally, summarize the records by deleting a few fields and feed to R/3.
    Solution i proposed:
    (1) File Adapter is used to send the file
    (2) Although JDBC adapter comes first to mind but since i need to access the DB2 tables multiple times for each record i propose to use an ABAP class for the mapping. Within the ABAP class the intent is to open an database connection to DB2, read the relevant cross tables using native SQL and finally generate the output XML.
    (3) Reciever is Proxy which feeds this generated XML to SAP for creating posting via BAPI_ACC_DOCUMENT_POST
    Question: Is the above solution correct or is there a better method to implement this scenario?
    Please let me know.
    Thanks,
    Minhaj.

    Looks fine. Few observations -
    1. Whether it is ABAP class or Mapping in RFC lookup, you are making multiple trips to the database.
    2. It looks like PI is being used only for reading the file and converting it to XML.
    3. If using PI is not mandatory, then a complete ABAP class on ECC it self would be faster than swtching between PI Java, PI ABAP then round trips to DB2 finally data push to ECC.
    If you could look at something like fetching all the required RFC look up data in one go and then map the fields according, might save u on processor and network resources.
    VJ

  • HT1338 Itunes, Mac Book, Mac Book Pro, Ipad, iCloud, iphones,i touch, iPods purchased. My accounts have been compromised. My documents taken photos, Conatacts, Business accounts and files. They have used my ID and know my ss # everything. I need to talk t

    I need to talk to someone about changing all of my accounts. A iCloud account was opened not by me and I lost 17 years of contacts. I have slowly gotten them back. My files from my Mac Book were taken and are gone. It has cost me about 60,000 dollars in business since November which has effected my staff as well. Many personal ireplacable memories of my childrens Photos were taken, Business, designs and accounting and personalFiles you name it gone or corrupted. My main PC including 4 external hard drives, then the Mac Book, My Iphones,itouch. Ipad were next and then my Mac Book pro. This is very humbling and heart felt. those who work with me have very strong beliefs, it was an internal doing or I should say someone gained or was allowed access to my home and equipment. I travel and tour and am gone quite a bit. This was and is the most difficult thing that has happened to me in a long time. In truth business and work will and can be rectified that not the point. It's how and what has been done which is the most damaging very personal almost vidictive but I will stop there. I feel so violated and saddened at the same time. I am hoping to contact someone through Apple or even an outside source to see if my files can be recouped and how to go about doing these changes all at once without all of the emails back and forth to approve changes in accounts what a pain. I want to change all accounts associated with apple. Apple ID and Pass words, I tunes ID and Pass word you name it.When I leave for work now days I have to take all of my equipment or lock things in the safe. I have an alarm system that is very good in additons to, animals still with the animals inside the motion detectors are off and in reality the damage has been done . I now this sounds crazy but I have proof of my back up files not all of them plus you can see in my documents all of my business accounts which are in orderof complition and dates are empty. My email accounts were also hacked and thru that individuals were able to change at will. When you have over 20 years of an association and relationships they know everything about someone. I do not want to press charges but I am to that point I need to bring in someone to investigate and I really do not know whom to even call. I have won awards for my work and my designs and information being taken has hurt more than words can express. I am currently out of town doing this late at night. I have changed my banking you name it. I need to have access to my computers to work but the stress of these constant changes and invasion of privacy are beyond expression. I plug in any of my usb drives and they are empty or my computers do not recognize them. I plug in my usb connector from my HP 8100  Printer with Blue tooth capabilities and it pops up and an external E drive for downloading just like an external drive. My printer acepts every imaginable portable disk on the market . Many of my usb drives are gone or have been corrupted. I have this darn air drop that goes on all the time. My computers I turn off and then they are on when I get up. I can go on and on. I live in the bay area and I am asking for help in trying to stop all of this. I will call Apple next but I wanted to put it out on this forum with the hopes of some response or input. I have all of my new and very minimal recovered information now on a web-based server which I know is safe the pass words and set up were done very discreetly (one can only hope). I apologize in advance for laying this out there like this. I am just so frustrated and because of the POSSIBLE implications makes it even harder In which I truly want to be proven wrong. I have never written or thought that I would be doing this as it is. If anything I hope some good comes out of this for someone. Bluetooth is a powerful tool this much I know now. Wow this is just simply amazing. There are 14 products I have purchased. I have been a windows person for years because of my work somethings are prapriatary to that OS but I love the Apple products. I am despratley trying not to nor will I throw in the towel. I know its a great product and its not the product. I just want to have the best opotunity to recover and have control over my designs and pretty much my privacy and peace of mind not too much to ask..:-) Oh! do not get me wrong I am willing to pay for services thats not the issue here. Once again thank you for at least espressing my frustrations.
    Warmest Regards,

    Hi
    Level 2 posters and Above can report various posts.
    When they do so they have various options that they can attribute as the issue.
    I have reported your post.
    I found the one block of text very difficult to read.
    9:36 PM      Monday; January 28, 2013
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Import of XML file failed in portal using XML Content and Action

    Hi Friends,
    I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS  which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
    The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
    <GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
    <Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context>     <Property name="parent1" value="pcd:portal_content"/>
         <Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
              <Attributes>
                   <Attribute name="com.sap.portal.pcm.Description" type="text">
                        <AttributeValue value="" locale=""/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
                   <Attribute name="com.sap.portal.pcm.Title" type="text">
                        <AttributeValue value="test" locale=""/>
                        <AttributeValue value="test" locale="en"/>
                        <Attribute name="administration" type="string">
                             <AttributeValue value=""/>
                        </Attribute>
                        <Attribute name="mandatory" type="string">
                             <AttributeValue value="true"/>
                        </Attribute>
                        <Attribute name="Inheritance" type="string">
                             <AttributeValue value="NONFINAL"/>
                        </Attribute>
                   </Attribute>
              </Attributes>
         </Context>
    </GenericCreator>
    SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
    Status Name Action Type Comment
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
    General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
    Dont know is there a service/ configurations needs to be done to enable this feature?.
    Thanks
    Edited by: hammad on Sep 4, 2009 5:48 PM
    Edited by: hammad on Sep 4, 2009 5:49 PM

    The problem statement is not very clear.
    Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
    Best Regards,
    Prasanna K

  • Somehow all my JPEG files want to open in Adobe Reader.  How do I change this setting so they open

    How do I reset my picture files (JPEG) so they open as pictures and not in Adobe Reader?

    Mac or Win? OS version?

  • Can I save an open PDF file as a .jpg using Acrobat Reader?

    Is there some kind of ad-on or other (third party?) program which would allow Acrobat reader to save or convert a PDF to a JPG?  I have the full version, along with Adobe Creative Suite, so I know I can do it with those programs.  This is for a friend with whom I share files and he only had the Acrobat Reader.
    Thanks

    No, Adobe Reader can only save as a text file, or using ExportPDF as Word or Excel documents.
    However, use Google to find many free PDF conversion tools on the Internet.

  • What file type should i use for reading a large file of data?

    I want to store data in a file and access them later. The data file could reach 500 to 1000 MBytes, as a binary file.
    I may have memory problems.
    I do not need the whole data in memory, only a few data each time, for my calculations.
    If i use a binary file, i can not read only a few data. I have to load the whole file and then read the data i need.
    Is this correct?
    If i use another type of file, can i read only a few bytes without loading the whole file?
    Maybe a TDMS file?
    Solved!
    Go to Solution.

    I would probably use a TDMS file for this since it could also be read into excel if it were small enough - just more flexiblility. But you can also do it using binary types. You don't have to read the entire file when using binary files. See below.

Maybe you are looking for

  • How to set up Open Gl Application in C   using Xcode

    i am trying to work for University Project in Xcode. Xcode always rocks my work but sometimes i probably unaware of its features i get problems like today i am having a problem in creating an application in C++ in which i have to use graphics. i dont

  • Can I use Microsoft excel on IPad 2 ?

    I'm new user for Apple products, Can I use Microsoft Excel files on IPad 2 ?

  • Problems with Satellite L775D-S730​5 System Recovery Process

    1.  Grandson accidentally erased 500GB internal hard drive. Recovery partition was not available.  Ordered, paid for and received Toshiba "SW Media-DVD-SATELLITE-L775-Windows 7 64 bit Home Premium-EN" recovery media. 2.  While going through recovery

  • Customer's are having problems viewing PDF's.

    I recently upgraded to Illustrator CS5 from CS4. Since the upgrade, I've been getting complaints from some customers that they cannot open the PDF's I'm sending them. This was never a problem with CS4. I went back and checked the save setting in illu

  • Drive mapping with 2 RVS 4000 over VPN

    Hello i have the following problem. I have created a VPN VPN connection with two RVS 4000 (release 2.x) i have a local network on one site with some PC's and a NAS drive. I have shared some of the direcorys. From the other Network i can ping each dev