Re: ImageIO, error when trying gif

From: Sudsy (
Date: 11/13/03

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 generates
> NoSuchElementExeption, shouldn't "gif" be a correct input to
> getImageWritersByFormatName(...)?
> Iterator writers = ImageIO.getImageWritersByFormatName("gif");
> ImageWriter writer = (ImageWriter);

According to the javadocs, NoSuchElementException is thrown by the 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