![]() |
#11
|
|||
|
|||
![]()
the 0x47.... data is stored in a database as varbinary.
is that what is making the string behave like a blob and not a real string of data? if so how would I go about turning that string back into binary data to load up into a string? |
#12
|
|||
|
|||
![]()
varbinabry always shows 0x47....
but the underlying string of data is actually different. R0lGODlhSwFnAPcAAAAAAAAAMwAAZgAAmQ.....(base64) lots of confusion on this issue. basically we have 2 different development teams (C# which accesses the data directly, cobol which we have to get from a .NET interface that sends back data in an quasi xml format) I asked for the data that was being sent to the cobol program (i don't have it all setup to work directly) so i asked the C# dev to send me a sample of the raw data that they get. they sent the 0x47... string but that is not the real data that is in the varbinary. i will now go thru all the setup to get the credit card payment processor all setup and working so i can see the real data being sent to it. hopefully it won't be the 0x47 but the actual base64 string. |
#13
|
|||
|
|||
![]()
If it's possible to post a complete string of what you're receiving an try to translate it would be easier, then we could do some tests aswell.
Do they have an anonymous/test file that they can output? |
#14
|
|||
|
|||
![]()
varbinary field.
Quote:
|
#15
|
|||
|
|||
![]()
in the background of all this, with 99% certainty, the signature comes to us as Base64 (presumed to be a bitmap) then the .NET app (buffer dll for giving me access to .NET components from COBOL) they issue the
convert.base64string and that is what I am supposed to be getting. |
#16
|
|||
|
|||
![]()
bitmap -> base64 -> string
|
#17
|
|||
|
|||
![]()
using...
Code:
var astr: string; bytes : TBytes; begin bytes := TNetEncoding.Base64.DecodeStringToBytes(mmo2.Lines.Text); astr := TEncoding.ASCII.GetString(bytes); |
#18
|
|||
|
|||
![]()
but I can't load it into an image not even a WICImage without getting an error. (different signature than the original one posted) Do I need to remove the beginning bytes or something. Not a graphics guru sorry....
Code:
'GIF89aK'#1'g'#0'w'#0#0#0#0#0#0#0'3'#0#0'f'#0#0#$19#0#0'L'#0#0#$7F#0'3'#0#0'33'#0'3f'#0'3'#$19#0'3L'#0'3'#$7F#0'f'#0#0'f3'#0'ff'#0'f'#$19#0'fL'#0'f'#$7F#0#$19#0#0#$19'3'#0#$19'f'#0#$19#$19#0#$19'L'#0#$19#$7F#0'L'#0#0'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e]'#$1A'mlT!wB&'#$C'v5oX]ir.='#$12',m'#$12'<''gn][oID3'#9'''.'#$1C'xxd_.UB'#$E'.]#\\VM._F,82D:TC'#$7F'|^}"p6/{'#$13'_.>"z''j=O'''#$19'|ax'#9'X}w'#$10'he'#$19'f_'#1']eD '#$7F'F'#5'h'#$1E's6'#$D'8'#$1C#1#7'R'#$17' Q'#9'e''`'#0'oYW!C;MX'#$1F'{'#$16'^'#8'`'#6'"'#9'x'#$18#6'H-Hbyp'#$19'hQh&uxa]l!h'#$18#6'/'#$12'Gc^='#2'T'#$1F#2'A'#$A#$17'#'#$C'''*T$'#2'<'#$D'9\'#$12'~M'#8'e\|M9#n:'#$12'i^'#$15'HB'#$18'e`\nf!q'#$14'JYep_Nd$'#8#$16'A8'#$11'wLE9bEV'#$16#5']{$'#$1A'fU'#$D'lfyV'#$1D'7'#$1D'9'''#$12'x'#$1E'(Wl'#$1A#$1E'&'''#8'E'#9':#C'#0#$1E'H['#$10#$A'bHh'#$E#$7F'H9'#$1A')'#$11#5#$15'Hh'#$18#1'fy)'#4#3'&'#$18')#(zgf'#$1F#$19']G]'#$16'h'#$E'zj&U%*&*{a$bv'#$B'~j)'#$19'I.: Q'#$C#$1D'z'#$1D'zV'#$1E#$1A'+'#$1D')BZk~?Bjl(?'#$1E'Ygz+'#$A'*$+S2kk3Rf'#$B'+'#8'|b'#$A'g,]Mj'#$15'0^n6&)a~'#$B'o8tI&X+P'#2#$B'i9TBEn2~-*'#$1C'?y}'#$18'm3~N{n}'#$1E#$B#$B'3'#$E'o1'#$F'~[(P'#$13'O\9!X#'#$B'W%'#$1E#$17'W7.'#$1C'F=9_'#$11'7I7"q'#$F'v'#$18'h#g6ik'#8'Gx-=ib=^)Z'#$E'Lqn(>Nx8{B'#8' |
#19
|
|||
|
|||
![]()
if I save the string to a file, then load that up into a twicimage it works. but it will not let me load the string into the wicimage.
I compared the string value to the file and they are nothing alike. apparently saving it to a file changes the string into a valid image. any ideas of what I need to do the string in order to load it into the image? |
#20
|
|||
|
|||
![]()
I really do appreciate as it keeps me plugin along....
Here was the solution. Code:
procedure TForm1.btn1Click(Sender: TObject); var wic : TWICImage; _bs : TBytesStream; begin wic := TWICImage.Create; _bs := TBytesStream.Create(TNetEncoding.Base64.DecodeStringToBytes(mmo2.Lines.Text)); _bs.Position := 0; wic.LoadFromStream(_bs); ….. |
![]() |
Thread Tools | |
Display Modes | |
|
|