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 : Sunday, September 6, 2009 9:17:12 PM(UTC)

jsshfj  
jsshfj

Groups: Registered
Posts: 2


I have RasterImaging 14.0 and try to use the "Copy" function of the "Raster" object for Copy RGN to the clipboard but does't work.

short sReturn = 0;

sReturn = m_LEADRasterView1.GetRaster().SetRgnRect(100,100,100,100, L_RGN_SET);

sReturn = m_LEADRasterView1.GetRaster().Copy(COPY_EMPTY | COPY_DIB | COPY_PALETTE | COPY_RGN);

sReturn = m_LEADRasterView2.GetRaster().Paste(PASTE_DOPASTE);


but send all the image.

Please help me!!!
Thanks.
 

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 : Monday, September 7, 2009 12:56:26 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

The COPY_RGN flag does not mean "copy region only".
It means "In addition to copying full bitmap, also copy region information".

If you want to copy only the region area, create an empty bitmap in a temporary LEADRaster object and copy the region pixels from the original object to the temp object using LEADRasterProcess.Combine().
Then use the Copy() method of the temp object to copy to clipboard.

 
#3 Posted : Monday, September 7, 2009 7:56:38 PM(UTC)

jsshfj  
jsshfj

Groups: Registered
Posts: 2


sReturn = m_leadRasterProcess.Trim(m_leadRaster, fLeft, fTop, fWidth, fHeight);
sReturn = m_leadRaster.Copy(LTRASTERLib.RasterCopyConstants.COPY_EMPTY | LTRASTERLib.RasterCopyConstants.COPY_DIB | LTRASTERLib.RasterCopyConstants.COPY_PALETTE);
 
#4 Posted : Tuesday, September 8, 2009 2:55:01 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,022

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

This will throw away the rest of the image, but it could work if you don't need the original image to stay the same.

 
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.082 seconds.