Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Saturday, July 27, 2013 6:50:17 AM(UTC)
gurcanyucel

Groups: Registered
Posts: 5


Hi,
Im a Delphi user. Is there any way to convert it without writing to file?

regards
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Saturday, July 27, 2013 12:11:12 PM(UTC)
gurcanyucel

Groups: Registered
Posts: 5


Never mind,
I found the way. If there is anyone interested in;

Var
aSTM:TMemoryStream;
aBitmap :BITMAPHANDLE;
FName :String;
aHandle :THandle;
iSize :L_SIZE_T;
pMem :PChar;
Begin
FName:='c:\A1.JPG';
aHandle:=0;
iSize:=0;
OpenImageFile(@aBitmap,0,FName);
L_SaveBitmapMemory(@aHandle,@aBitmap,FILE_JPEG,aBitmap.BitsPerPixel,20,@isize,nil);

aSTM:=TMemoryStream.Create;
pMem:=GlobalLock(ahandle);
aSTM.Write(pmem[0],iSize);
aSTM.SaveToFile('c:\1.jpg'); //do whatever you want with stream
aSTM.Free;
GlobalUnlock (aHandle);
GlobalFree (aHandle);

end;


I wonder is there any way for L_SaveBitmapList? I have lots of files. Im preparing a bitmap list. Is it possible to save this list to TStream? without saving it to disk?

regards
 
#3 Posted : Monday, July 29, 2013 3:26:51 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

If you want to save a multi-page image in memory, you can use the L_SaveFileMemory to save the first page in memory, and then save the other pages to the same image (in memory) by passing SAVEFILE_MULTIPAGE flag to the L_SaveFileMemory function.

If this is not what you're trying to do, please give me more details about your requirements.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#4 Posted : Wednesday, July 8, 2015 6:59:59 AM(UTC)

dky  
dky

Groups: Registered
Posts: 2


My problem is convert TStream to BITMAPHANDLE.
I would convert a cmp file in TMemoryStream to BMP format in BITMAPHANDLE, so I can show in TImage instead of Disk.

Is any body know how to do that?
Thx..
 
#5 Posted : Thursday, July 9, 2015 4:28:16 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

dky,

Please don't reopen an old thread that you did not start, because your issue could be different - and it is indeed different in this case. Also, for this particular question, you already started thread 44798 and we gave you an initial reply. I recommend trying the idea we gave you there and if it doesn't work, go back to that thread with a follow up reply.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.073 seconds.