How do I get PNG image data as a decoded bytearray?

77 views
Skip to first unread message

Xavier

unread,
Aug 2, 2011, 11:03:07 PM8/2/11
to Google Web Toolkit
I would like to read a PNG image and have the data accessible to me as
a decoded bytearray. How would I go about doing this? Any help is
appreciated.

mP

unread,
Aug 2, 2011, 11:57:03 PM8/2/11
to Google Web Toolkit
Use the Apache Sanlasan project if you cant load the PNG using java's
built in IOImage.

BST

unread,
Aug 3, 2011, 1:20:18 AM8/3/11
to google-we...@googlegroups.com

By read do you mean upload it from a location on the client side?

For that you need to use a GWT FormPanel and Apche commons ServletFileUpload to get the file item then do the usual java io process to convert to a byte array.

If this is not what you looking for , please elaborate on the question.

Xavier

unread,
Aug 3, 2011, 1:22:47 PM8/3/11
to Google Web Toolkit
Yes I need the bytearray on the clientside. Can I use an
imageresource for this?
Reply all
Reply to author
Forward
0 new messages