Re: ImageIO, error when trying gif
From: Sudsy (bitbucket44_at_hotmail.com)
Date: 11/13/03
- Next message: John C. Bollinger: "Re: How to set the src of a html <img> tag to a string returned from a jsp page?"
- Previous message: Stefan: "Struts help"
- In reply to: Peter the Swede: "ImageIO, error when trying gif"
- Next in thread: Marco Schmidt: "Re: ImageIO, error when trying gif"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 Nov 2003 12:20:27 -0500
Peter the Swede wrote:
> Groupmembers,
>
> I'm using the following to write to a file. The writers.next() generates
> NoSuchElementExeption, shouldn't "gif" be a correct input to
> getImageWritersByFormatName(...)?
>
> Iterator writers = ImageIO.getImageWritersByFormatName("gif");
> ImageWriter writer = (ImageWriter)writers.next();
According to the javadocs, NoSuchElementException is thrown by the
Iterator.next method when "iteration has no more elements". Seems
clear enough to me! Now, it shouldn't be surprising that Sun doesn't
include gif writers in their distribution. Unisys is exerting patent
rights to the format and is demanding license fees from companies
which incorporate the patented algorithms in products. Sun is just
avoiding problems. You could do a search on the 'net for third-party
writers...
- Next message: John C. Bollinger: "Re: How to set the src of a html <img> tag to a string returned from a jsp page?"
- Previous message: Stefan: "Struts help"
- In reply to: Peter the Swede: "ImageIO, error when trying gif"
- Next in thread: Marco Schmidt: "Re: ImageIO, error when trying gif"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]