Could I use jpg's binary stream as image immediately?

lqg2118

Member
Licensed User
Longtime User
FileOpen(c1,"example.exe",cRandom)
binread.New1(c1,True)
length=binread.ReadBytes(readstream(),1000000)

......
......
______________________________________step2
FileOpen(c2,"temp.jpg",cRandom)
binwrite.WriteBytes2(readstream(),jpgbegin,jpglength) 'yes, i knew the location of a jpg
......

Image1.LoadPicture("temp.jpg")
......
_______________________________________step2
......
imageedit1.LoadImage(image1.Image)
imageedit1.RotateLeft

image1.Image=imageedit1.GetImage("RGB") 'here i did't create a real file on harddisk but use it from memory immediately!!!


my question is in step2 ,must i create a real file on harddisk?since i knew the location of a jpg in a binary dimension,could i load the data from memory directly to a image bag just like the last line?

creating a real file on harddisk spent more time,i need quick show.

thanks!
 
Last edited:

lqg2118

Member
Licensed User
Longtime User
It's really a door,why didn't i think of that?

Thank you very much!
 
Last edited:

lqg2118

Member
Licensed User
Longtime User
my code ran quickly on pc, but writing a file on device is too slow,i found that after changing the last line, I had written the rotated jpg on sd card before.
----------------
and now i knew why basic4ppc is so easy to use,that is because you guys wrote so many amazing dlls.
 
Last edited:
Top