![]() |
|
#1
|
|||
|
|||
|
image1(link to a jpg)
i use image1.picture.bitmap.writetostream(m); an use image2.picture.bitmap.loadfromstream(m); but fail why? ~3homer~ Thanx,very much. |
|
#2
|
|||
|
|||
|
Writing the JPEG into the stream fails because the JPEG is not available as bitmap (bitmap is only available if the image contains a BMP), but as graphic:
image1.picture.graphic.savetostream() Loading a bmp from stream is only working in your code if there is already something in bitmap - but if you have a JPEG inside that image before it will fail. Then you have to do like this: var h: TBitmap; begin h:=NIL; try h:=TBitmap.Create; h.loadfromstream(m); image1.picture.graphic.assign(h); finally h.free; end; end; Bye, Andy If it helped please click accept... |
![]() |
| Thread Tools | |
| Display Modes | |
|
|