TWAIN ActiveX Control, Plug-in, Scanner SDK, Component, HTTP Control/SDK

Dynamsoft TWAIN Products

Support Community for TWAIN Control/Component/SDK for Scanning Solutions
* Login   * Register
* FAQ    * Search

It is currently Tue May 22, 2012 2:04 am




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Replace image in image list from clipboard
PostPosted: Tue Jun 21, 2011 4:50 am 
Offline

Joined: Tue Jun 21, 2011 4:41 am
Posts: 4
Hi guys,

We have a problem with our project. The version of the component (Dynamic .NET Twain) is 1.0.1

Our project goal is editing a scanned image. After scanning multiple images, we have functions to edit the selected image from the list (crop, rotate, etc).
Now we have made a Restore function, that will reset the edited image.

We achieved our goal by keeping the original image on the clipboard but we can't replace the current restored image with the edited one in the list (dynamicDotNetTwainThum). It just adds the restored image as new one in the list and instead one image we have two (the edited and the restored one).


If someone has experience with this issue, please help us.

Thank you.
EuroNetCom


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Tue Jun 21, 2011 10:18 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi EuroNetCom,

You can remove the edited image in the list using RemoveImage Method and load back the original copy to the control in the Restore function.

Regards,

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Wed Jun 22, 2011 12:56 am 
Offline

Joined: Tue Jun 21, 2011 4:41 am
Posts: 4
Thank you for the answer.

We can remove the image, but the case is when we have more than 1 image in the list.
So, if we remove the edited image, the restored one goes on the last index in the list. And that is a problem since we care about the image ordering.

What can we do about this issue? Any suggestion about ordering indexes?

Thank you.
Regards,


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Wed Jun 22, 2011 10:37 pm 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi EuroNetCom,

Please try the following code and let me know how it works for you. Please select the corresponding image you want to recover before clicking the Restore button.

Code:
private void dynamicDotNetTwain1_OnMouseClick(short sImageIndex)
        {
            dynamicDotNetTwain1.CurrentImageIndexInBuffer = sImageIndex;
        } //set the selected image as the current image

        private void btnRestore_Click(object sender, EventArgs e)
        {
            short imgindex = dynamicDotNetTwain1.CurrentImageIndexInBuffer;
            dynamicDotNetTwain1.IfAppendImage = false;
            dynamicDotNetTwain1.LoadDibFromClipboard();           
            dynamicDotNetTwain1.RemoveImage((short)(imgindex+1));
        }


Regards,

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Wed Jun 22, 2011 10:56 pm 
Offline

Joined: Tue Jun 21, 2011 4:41 am
Posts: 4
Thanks for the solution but we already tried this and the problem is that the change of the indexes is visible for the user eye.
To be more specific, if we have two images in the list.. when we change the order of the images, I can see the switch of the indexes, it's visible.

So, we were wondering if you have some idea how can we make this change without being visible to the end user.

Thank you.
Regards,


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Fri Jun 24, 2011 12:46 am 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi EuroNetCom,

Would you be more specific with "the change of the indexes is visible for the user eye"? Do you have some text field showing the current image index? Or you mean the image switch in our component when restoring?

Regards,

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Tue Jun 28, 2011 5:54 am 
Offline

Joined: Tue Jun 21, 2011 4:41 am
Posts: 4
Yes, the image switch in the component when restoring. This switch is visible if we change the index order.
You can actually see how the second image goes first or vice-verse.


Top
 Profile  
 
 Post subject: Re: Replace image in image list from clipboard
PostPosted: Wed Jun 29, 2011 2:43 am 
Offline
User avatar

Joined: Tue Mar 08, 2005 12:23 am
Posts: 1075
Hi EuroNetCom,

Currently, the switch of images in the component is visible.

Thanks for your feedback. I have forwarded it to our R&D and we will try to improve this in the next release. We will keep you updated.

Regards,

_________________
Catherine Sea
TWAIN Support Team
TWAIN ActiveX/Plug-in for Web Applications, Scanner COM Control
TWAIN .NET Component/SDK for Desktop Applications

Follow me @Twitter, Facebook
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

It is currently Tue May 22, 2012 2:04 am


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Copyright © 2010 Dynamsoft Corporation. All Rights Reserved. | Knowledge Base | Source Control Blog