Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

javax.imageIO error...

Thread view: 
Ivar - 27 Oct 2006 18:55 GMT
Hey guys,
So in my applicationI'm trying to use the javax.imageio.ImageIO class
in order to read images from a location into a BufferedImage object

...so something like this...

try {  image = ImageIO.read(new
File(filename));---------------------->Line 10
       } catch(IOException e) {
           e.printStackTrace();
           throw new RuntimeException("Could not open file: " +
filename);
       }

But at the end of it all when I run, I get this weird error...
sun.misc.ServiceConfigurationError:
javax.imageio.spi.ImageOutputStreamSpi: Provider
com.sun.media.imageioimpl.stream.ChannelImageOutputStreamSpi not found
    at sun.misc.Service.fail(Unknown Source)
    at sun.misc.Service.access$000(Unknown Source)
    at sun.misc.Service$LazyIterator.next(Unknown Source)
    at
javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown
Source)
    at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
    at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
    at javax.imageio.ImageIO.<clinit>(Unknown Source)
    at appli.main(appli.java:10)---------------------> See line 10 above
Exception in thread "main"

This is a fairly confusing error for I've never seen anything like this
before...any suggestions? I would really appreciate it..
John Gordon - 27 Oct 2006 19:21 GMT
> This is a fairly confusing error for I've never seen anything like this
> before...any suggestions? I would really appreciate it..

Are you sure that "filename" exists, is readable, and is an image file in
a recognized format?

Signature

John Gordon            "It's certainly uncontaminated by cheese."
gordon@panix.com

Ivar - 27 Oct 2006 20:04 GMT
Hi,
Yea I checked that - there is a valid PNG image in the location
corresponding to the 'filename' string that I give to it

> > This is a fairly confusing error for I've never seen anything like this
> > before...any suggestions? I would really appreciate it..
[quoted text clipped - 5 lines]
> John Gordon            "It's certainly uncontaminated by cheese."
> gordon@panix.com
Andrew Thompson - 28 Oct 2006 03:39 GMT
...
> Yea I checked that -

Checked what?  Please refrain from top-poasitng - it is most confusing.

>... there is a valid PNG image

According to who or what?  What software has led you to
believe the image is 'valid and correct'.  Note that to be
any good, a system based image viewer has to be very
robust, and figure ways to overlook, or correct, problems
with 'almost right' images.

>...in the location
> corresponding to the 'filename' string that I give to it

How big is the image (in bytes)?  Is it proprietary?
Can you upload that image to your server and
provide the link?

Andrew T.
Ivar - 27 Oct 2006 22:36 GMT
Hi,
Yea I checked that - there is a valid PNG image in the location
corresponding to the 'filename' string that I give to it

> > This is a fairly confusing error for I've never seen anything like this
> > before...any suggestions? I would really appreciate it..
[quoted text clipped - 5 lines]
> John Gordon            "It's certainly uncontaminated by cheese."
> gordon@panix.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.