Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

need to convert image to byte[]

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

This post is a continuation of a conversation from a
previous post concerning images and xml

My original query asked, "how do you move image data over a network using xml?"
Image data is, of course, binary data. Therefore, I didn't even know if you could convert it somehow into character data to fit into an xml document, sent over the network, then reassembled at the other end.
It was suggested I look at using Base64 to encode and decode the image data.
So, I put together a small test app (see below) to test this theory. The problem however, comes in when I have to convert the image from ImageIcon to a byte[] array. If you look at the example code you can see where I'm stuck.

Any help would be appreciated.

Alan


[ November 15, 2007: Message edited by: Alan Shiers ]
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has some suggestions.

As does this.

And this

All of which were found quickly by doing this.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joanne, you wouldn't have been able to find
this

or this

or even this

if someone or some people at some point hadn't asked a question about something they didn't know how to do. So don't be a such a jerk. If you don't want to answer a question then don't. If people didn't ask questions you wouldn't be able to find this.
[ May 22, 2008: Message edited by: Brandon Broschinsky ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Brandon,

without having looked at the linked content from Joanne's post, I'd assume that it might in fact be helpful to the original poster. I also don't see anything wrong with telling him how he can find such things faster by himself in the future. I also didn't see any name calling in the post - all in all, it didn't look un-nice to me, even if a bit shortspoken.

So I'm not sure what you are so upset about. I'd suggest, though, that you might be more successful by being a role model of the behavior you'd like to see. Whatever you do, please respect our Be Nice rule. Thanks!
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic