Microsoft images won't scale

Image scaler add-on.

Microsoft images won't scale

Postby slin » Mon Oct 27, 2008 2:00 am

In testing the JImageFilter add-in, I was just trying a bunch of sample images. On my Windows XP box, I have the following images. I _think_ everyone running XP should have these, I believe they're just part of the OS install:

<My Documents>\My Pictures\Sample Pictures\Blue hills.jpg
<My Documents>\My Pictures\Sample Pictures\Water lillies.jpg
<My Documents>\My Pictures\Sample Pictures\Winter.jpg

When I try to scale/upload any of these images, I get the following error:

"Upload failed: javax.imageio.IIOException: Missing Huffman code table entry"

and in the Java Console, I see this:
Exception in thread "AWT-EventQueue-4" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicProgressBarUI.updateSizes(Unknown Source)
at javax.swing.plaf.basic.BasicProgressBarUI.getBox(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsProgressBarUI.getBox(Unknown Source)
at com.sun.java.swing.plaf.windows.WindowsProgressBarUI.paintIndeterminate(Unknown Source)
at javax.swing.plaf.basic.BasicProgressBarUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)



Maybe these images are just corrupt somehow? But they seem to open ok in most of my image processing software. And they're the sample Microsoft images on XP which means (a) I would have though they'd be valid images and (b) a lot of my own website clients might happen to choose these images when testing my site - which, if using your uploader, might have some issues.

Any ideas?

Thanks again. And sorry to be such a pain - you have already done me a great favor by implementing my features requested in the Image Preview forum!

Steve

P.S. Just in case you aren't running XP or don't happen to have those images, I'm attaching one of them to this post...
Attachments
Blue hills.jpg
(27.85 KiB) Downloaded 278 times
slin
 
Posts: 4
Joined: Fri Oct 24, 2008 12:02 pm

Re: Microsoft images won't scale

Postby support » Mon Oct 27, 2008 9:38 am

I've tried your image and my own images under my Windows XP and it seems to work fine. I don't get any error and images are scaled. Did you modify the scaling.properties I've provided ?
Also, try to clean your Java cache:
Start->Control Panel->Java->First tab->Delete temporary files->Apply.
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm

Re: Microsoft images won't scale

Postby slin » Tue Oct 28, 2008 2:16 am

I compared the differences between my scaling.properties and the stock one from the zip file, and tried toggling each difference until I could reliably repeat the issue.

Turns out that the "metadata=all" is what is causing the errors with the Microsoft images mentioned in the original post. I did put "metadata.error=ignore" because I would rather just ignore any problems in the metadata and still do the upload.

But even with "metadata.error=ignore", the upload still fails whenever I have "metadata=all" in the properties file and I try one of the aforementioned Microsoft samples.

If you get a chance could you try again with "metadata=all"? Sorry, I should have provided this detail in the original post, I didn't even think to try comparing it to the stock properties file.

Thanks,
Steve
slin
 
Posts: 4
Joined: Fri Oct 24, 2008 12:02 pm

Re: Microsoft images won't scale

Postby support » Tue Oct 28, 2008 7:40 am

Use metadata=unknownmarker instead of metadata=all and it should work. It's safer, it allows to forward EXIF and IPTC tags from original image into the scaled image.
User avatar
support
 
Posts: 1501
Joined: Sun Jan 27, 2008 6:19 pm


Return to JImageFilter



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.