Niclas,

That should work. Could you give some more detail about the details of the
SampleModel and ColorModel in the ImageTypeSpecifier, e.g., number of bands,
bits per sample, alpha presence, alpha type.

Brian

On Tue, 7 Dec 2004, Niclas Hedhman wrote:

> Hi,
>
> I have a small image processing servlet, that does;
>
> m_Format = "png" in this case.
>
>     private void write( BufferedImage image )
>         throws ProcessingException, IOException
>     {
>         ImageTypeSpecifier its = ImageTypeSpecifier.createFromRenderedImage(
> image );
>         Iterator writers = ImageIO.getImageWriters( its, m_Format );
>         ImageWriter writer = null;
>         if( writers.hasNext() )
>         {
>             writer = (ImageWriter) writers.next();
>         }
>         if( writer == null )
>             throw new ProcessingException( "Unable to find a ImageWriter: " +
> m_Format );
>
>         /// And so on....
>     }
> The effectsStack is basically a set of ImageOp's, mostly used is the Scale.
>
> Now, if I take a 32bpp TIFF and feed it to the routine above, Image I/O won't
> find a writer for it, but a 24bpp TIFF is no problem.
> (I don't think it matters; prior to the write operation, the TIFF has been
> rescaled using java.awt.image raster operations, but the ColorModel from the
> incoming BufferedImage is used for the new rescaled image.)
>
>
> Anyone have a clue why this seems to be the case?
>
>
> Cheers
> Niclas
> --
>    +------//-------------------+
>   / http://www.dpml.net       /
>  / http://niclas.hedhman.org /
> +------//-------------------+
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

----------------
Brian Burkhalter
Advanced Development, Graphics and Media
Software Chief Technology Office
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to