Click here to Skip to main content
15,920,666 members
Home / Discussions / C#
   

C#

 
GeneralRe: InvertRegion Pin
mhmoud rawas6-Dec-03 8:40
mhmoud rawas6-Dec-03 8:40 
GeneralRe: InvertRegion Pin
J. Dunlap6-Dec-03 9:42
J. Dunlap6-Dec-03 9:42 
GeneralRe: InvertRegion Pin
mhmoud rawas6-Dec-03 18:00
mhmoud rawas6-Dec-03 18:00 
GeneralRe: InvertRegion Pin
J. Dunlap7-Dec-03 14:56
J. Dunlap7-Dec-03 14:56 
GeneralJPG Size Pin
mhmoud rawas5-Dec-03 22:07
mhmoud rawas5-Dec-03 22:07 
GeneralRe: JPG Size Pin
Heath Stewart6-Dec-03 4:57
protectorHeath Stewart6-Dec-03 4:57 
GeneralRe: JPG Size Pin
Anonymous6-Dec-03 6:23
Anonymous6-Dec-03 6:23 
GeneralRe: JPG Size Pin
Heath Stewart6-Dec-03 6:44
protectorHeath Stewart6-Dec-03 6:44 
Actually, I already gave you a clue in my first paragraph: MemoryStream. Save the Bitmap as a JPEG to a MemoryStream and determine the length by checking the Length property. Also, you don't need to preallocate space in a MemoryStream if you use the right constructor.

You didn't mention before that you weren't saving the XML file to disk. While you can use CDATA sections to write binary data, this is not recommended - especially when you persist XML to disk or for transport. This is where binary encodings like base64 are necessary. If Cyrstal isn't extensible enough to base64 decode an image, then you'll have to keep doing what you're doing.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: JPG Size Pin
mhmoud rawas6-Dec-03 7:22
mhmoud rawas6-Dec-03 7:22 
GeneralRe: JPG Size Pin
mhmoud rawas6-Dec-03 7:24
mhmoud rawas6-Dec-03 7:24 
GeneralRe: JPG Size Pin
mhmoud rawas6-Dec-03 7:17
mhmoud rawas6-Dec-03 7:17 
GeneralFile Size over Internet Pin
eggie55-Dec-03 21:06
eggie55-Dec-03 21:06 
GeneralRe: File Size over Internet Pin
leppie5-Dec-03 21:51
leppie5-Dec-03 21:51 
GeneralRe: File Size over Internet Pin
Heath Stewart6-Dec-03 4:50
protectorHeath Stewart6-Dec-03 4:50 
GeneralRe: File Size over Internet Pin
eggie56-Dec-03 11:20
eggie56-Dec-03 11:20 
GeneralIdentifying the Web Server Pin
eggie55-Dec-03 15:07
eggie55-Dec-03 15:07 
GeneralRe: Identifying the Web Server Pin
eggie55-Dec-03 16:05
eggie55-Dec-03 16:05 
GeneralRe: Identifying the Web Server Pin
Heath Stewart6-Dec-03 4:49
protectorHeath Stewart6-Dec-03 4:49 
GeneralRe: Identifying the Web Server Pin
eggie56-Dec-03 5:54
eggie56-Dec-03 5:54 
GeneralRe: Identifying the Web Server Pin
Heath Stewart6-Dec-03 6:36
protectorHeath Stewart6-Dec-03 6:36 
GeneralRe: Identifying the Web Server Pin
eggie56-Dec-03 11:25
eggie56-Dec-03 11:25 
Generalmaking the computer restart after a setup program is finished Pin
blakeb_15-Dec-03 11:02
blakeb_15-Dec-03 11:02 
GeneralRe: making the computer restart after a setup program is finished Pin
Heath Stewart5-Dec-03 11:34
protectorHeath Stewart5-Dec-03 11:34 
GeneralRe: making the computer restart after a setup program is finished Pin
blakeb_15-Dec-03 11:38
blakeb_15-Dec-03 11:38 
GeneralRe: making the computer restart after a setup program is finished Pin
Heath Stewart6-Dec-03 4:19
protectorHeath Stewart6-Dec-03 4:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.