ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 possible problem with pasting into image selection

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jrpcguru Posted - Apr 24 2019 : 17:58:39
I just realized that my program was using the deprecated versions of Copy/Cut/Paste, so I decided to update to your current versions. Then I discovered that my program would no longer paste into a selection. I retested an older version of my program and it still pastes into a selection.

So I tried the PhotoEn demo program. It has a paste to selection or Paste to Rect option on the menu. (ActiveMDIChild as TMDIChild).ImageEnView1.Proc.PasteFromClipboard(iecpSelection);

I've also tried in the demo: ImageEnView1.Proc.PasteFromClipboard(iecpSelection,true,true,false); //maintain aspect ratio
ImageEnView1.Proc.PasteFromClipboard(iecpAuto);



With D10.3 and XE2 the demo does not work any more. Is it possible something has gone wrong with pasting to a selection? If it makes any difference, I'm trying to paste an image from win 10 snipping tool, which works if I don't have a selection.

Further update: if the image on the clipboard came from ImageEn, paste to selection works. But not if the image came from the snipping tool.

J.R.
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 29 2019 : 01:00:44
You're right. That's a bug. For 8.5.1, it will match the pixel format of the destination.

Email me for updated source.


Nigel
Xequte Software
www.imageen.com
jrpcguru Posted - Apr 28 2019 : 19:42:50
After more testing, here is some useful info:

If my sample image is a JPG, then I can paste into a selection regardless of whether the source image is an ImageEn selection to clipboard or a Snipping Tool image.

I was using several TIF files as my original sample images and paste to selection failed. Then I realized the sample TIFs were B&W, not color. A color TIF worked correctly. If I use ImageEn to copy a selection from the B&W TIF, it pastes back into a selection as expected. But apparently the Snipping Tool creates a color image, even when snipping from the B&W TIF image, since it does not paste into a selection.

So I guess the question is whether that is the intended behavior? Would it be worth having some useful error message if it can't paste a color image into a selection on a B&W image? Or should it convert to B&W and paste into the selection?

If there is no selection, then the entire B&W TIF is replaced by the color image from the clipboard.

J.R.
xequte Posted - Apr 28 2019 : 17:51:53
Hi JR

I cannot reproduce that:

1. Make a selection in the PhotoEn demo
2. Copy a window using the Snipping Tool
3. Click a button which calls: ImageEnView1.Proc.PasteFromClipboard(iecpSelection);

It pastes to the selection box as expected. Can you give me more info?

Nigel
Xequte Software
www.imageen.com