Insert PNG File from Servlet no go
"William L. Thomson Jr." <[email protected]> 22 Jan 2003 18:02:18 -0800
| Newsgroups | gmane.comp.java.jgenerator.devel |
|---|---|
| Message-ID | <[email protected]> |
To all,
In the past I have mostly dealt with JPEGs and have not run into this
problem. I am trying to use the Insert PNG File to insert a PNG that is
stored in a blob format in a database.
I have a servlet that I have been using for JPEG's, and it serves up
the PNG just fine. However JGenerator does not like the servlet
generated PNGs?
I get the following exception
2003-01-22 13:22:35,172 [INFO] - Retrieving content of
http://www.obsidian-studios.com/servlet/Picture
2003-01-22 13:22:35,173 [ERROR] - Error occured in file
'/home/sites/home/web/sw-bin/picture.swt', movie clip 'null', frame '1',
command 'InsertPngFileCommand'
com.iv.flash.util.IVException: Unsupported media file
'http://www.obsidian-studios.com/servlet/Picture'
at
com.iv.flash.api.FlashFile.addExternalMedia(FlashFile.java:342)
at
com.iv.flash.api.FlashFile.addExternalMedia(FlashFile.java:366)
at
com.iv.flash.commands.InsertPngFileCommand.doCommand(InsertPngFileCommand.java:77)
at com.iv.flash.api.Frame.doCommand(Frame.java:374)
I have removed the servlet params that are used to retrieve the PNG
image.
Now I am simply using the PrintWriter to write out png data, and the
content type has been set to image/png.
Basically my servlet is the same for JPEG, PNG, and GIFS. I just simply
change the content type
image/jpeg
image/png
image/gif
I have not tried GIFs yet. Hopefully I will not run into this problem
with them?
Any comments? Ideas? Thoughts?
--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone 707.766.9509
Fax 707.766.8989
http://www.obsidian-studios.com
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp