Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
ChingYen  
#1 Posted : Wednesday, March 12, 2008 2:15:30 AM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
Hi,

I am trying to add mask to my image, and I would like to make an undo and redo for it.

I tried those sample from the internet but still can't get it work. anyway could give me a better idea on it please? Thanks.

Code:
                _bmViewer.Bitmap.UndoRedoEnabled = False

                'Dim UserImage As Aurigma.GraphicsMill.Bitmap = _bmViewer.Bitmap

                Dim UserImage As New Aurigma.GraphicsMill.Bitmap(_bmViewer.Bitmap)

                Dim _item As Aurigma.GraphicsMill.WinControls.ThumbnailListItem
                _item = _thlMask.SelectedItems(0)

                Dim MaskImage As New Aurigma.GraphicsMill.Bitmap(_item.Pidl.Path)
                Dim resultImage As New Aurigma.GraphicsMill.Bitmap(UserImage.Width, UserImage.Height, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb)

                ' Mask Preperation
                MaskImage.HorizontalResolution = UserImage.HorizontalResolution
                MaskImage.VerticalResolution = UserImage.VerticalResolution
                MaskImage.Transforms.Resize(UserImage.Width, UserImage.Height, Transforms.ResizeMode.Resize)
                If MaskImage.PixelFormat <> PixelFormat.Format8bppGrayScale Then
                    MaskImage.ColorManagement.Convert(PixelFormat.Format8bppGrayScale)
                End If

                resultImage.HorizontalResolution = UserImage.HorizontalResolution
                resultImage.VerticalResolution = UserImage.VerticalResolution
                resultImage.Transforms.Resize(UserImage.Width, UserImage.Height, Transforms.ResizeMode.Resize)


                resultImage = ManualCombine(UserImage, MaskImage)


                _bmViewer.Bitmap = resultImage
                _bmViewer.Bitmap.UndoRedoEnabled = True
                _bmViewer.Bitmap.SaveState()
                _btnUndo.Enabled = True

Edited by user Friday, March 14, 2008 11:57:23 PM(UTC)  | Reason: Not specified

Alex Kon  
#2 Posted : Wednesday, March 12, 2008 5:19:14 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

I am afraid that it will be hard to help you having only this part of code. For example, I cannot find any Undo() or Redo() calls. Could you submit case with a complete sample project? I will do my best to assist you with this issue.

Edited by user Thursday, May 22, 2008 2:16:43 PM(UTC)  | Reason: Not specified

ChingYen  
#3 Posted : Thursday, March 13, 2008 10:19:40 AM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
Hi,

The sample project is a bit too big to send via Email. I already upload the files to our webserver and emailed the URL detail to you. Please confirm. Thanks.

Alex Kon  
#4 Posted : Thursday, March 13, 2008 2:53:28 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hi,

OK, I have received the URL and downloaded the sample. I will answer you by email.

ChingYen  
#5 Posted : Thursday, March 13, 2008 11:29:22 PM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
Okay. Thanks. Will be waiting for it...
Alex Kon  
#6 Posted : Friday, March 14, 2008 5:20:47 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hi,

I have answered you by email. Please post here a line if you have not got the message.

Edited by user Friday, March 14, 2008 5:21:32 PM(UTC)  | Reason: Not specified

ChingYen  
#7 Posted : Sunday, March 16, 2008 9:09:48 AM(UTC)
ChingYen

Rank: Advanced Member

Groups: Member
Joined: 3/3/2008(UTC)
Posts: 185

Thanks: 8 times
Alex Kon wrote:
Hi,

I have answered you by email. Please post here a line if you have not got the message.

Thanks for the solution. It works great !!!

Users browsing this topic
Similar Topics
Undo and Redo methods (Other Products)
by KgMonsok 7/27/2005 1:24:00 AM(UTC)
Undo and Redo Exception in BitmapViewer using Remoting Scripting (Discussions – Graphics Mill)
by czyzer 2/13/2005 4:41:00 AM(UTC)
Forum Jump  
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.