RE: Insert PNG File from Servlet no go
Andrew Watson <[email protected]> Fri, 24 Jan 2003 19:22:52 +1100
| Newsgroups | gmane.comp.java.jgenerator.devel |
|---|---|
| Message-ID | <[email protected]> |
Only other thought is that the url is not being processed correctly... I mean "http://www.obsidian-studios.com/servlet/Picture" is not the full = url surely (or is picture the servlet, or did you replace the picture = name with that)? If there is a space in the url, try encoding it with = %20. Unfortunately at the moment I only use the offline jgenerator mode, so I = probably don't get the same errors, but I know when I tried = "http://127.0.0.1/png pics/lgc202.png" it gave an error, but when I = tried "http://127.0.0.1/png%20pics/lgc202.png" it worked just fine. Because of the above limitation, it may take me awhile to track down = your error, but by all means send it along and I will have a look at it. Andrew -----Original Message----- From: William L. Thomson Jr. [SMTP:[email protected]] Sent: Friday, January 24, 2003 2:54 PM To: JGen Devel Subject: RE: [Jgen-devel] Insert PNG File from Servlet no go Andrew, On Thu, 2003-01-23 at 14:04, Andrew Watson wrote: > It would seem that when you try to add a png file, it doesn't go by = the file extension, but the first four bytes in the stream.. >=20 > b0 =3D=3D 0x89 && b1 =3D=3D 0x50 && b2 =3D=3D 0x4e && b3 =3D=3D 0x47 All my png images start with those 4 bytes. Both before insertion into the db, while in the db, and after extraction from the db. > If the first four bytes are not those, then you will get the error you = describe. =20 > It should be easy enough for you to verify that they are. I have verified before, while, and after. Any more suggestions? I can send you the url and params to see the images yourself? I can also email the code behind the servlet, but will post neither to the group. Only directly to your or Dmitry. > Andrew >=20 > -----Original Message----- > From: William L. Thomson Jr. [SMTP:[email protected]] > Sent: Thursday, January 23, 2003 12:02 PM > To: JGen Devel > Subject: [Jgen-devel] Insert PNG File from Servlet no go >=20 > 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.=20 >=20 > 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? >=20 > I get the following exception >=20 > 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) >=20 >=20 > I have removed the servlet params that are used to retrieve the PNG > image. >=20 > Now I am simply using the PrintWriter to write out png data, and the > content type has been set to image/png. >=20 > Basically my servlet is the same for JPEG, PNG, and GIFS. I just = simply > change the content type >=20 > image/jpeg > image/png > image/gif >=20 > I have not tried GIFs yet. Hopefully I will not run into this problem > with them? >=20 > Any comments? Ideas? Thoughts? >=20 > --=20 > 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 >=20 >=20 >=20 > ------------------------------------------------------- > 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 > _______________________________________________ > Jgen-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jgen-devel >=20 > __________ Information from NOD32 1.349 (20030120) __________ >=20 > This message was checked by NOD32 for Exchange e-mail monitor. > http://www.nod32.com >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Jgen-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jgen-devel >=20 --=20 Sincerely, William L. Thomson Jr. Obsidian-Studios, Inc. 439 Amber Way Petaluma, Ca. 94952 Phone 707.766.9509 Fax 707.766.8989 http://www.obsidian-studios.com --=20 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: SourceForge Enterprise Edition + IBM + LinuxWorld =3D Something 2 See! http://www.vasoftware.com _______________________________________________ Jgen-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jgen-devel __________ Information from NOD32 1.350 (20030122) __________ This message was checked by NOD32 for Exchange e-mail monitor. http://www.nod32.com ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com