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

Notification

Icon
Error

Options
Go to last post Go to first unread
BarryP  
#1 Posted : Saturday, March 25, 2006 6:51:39 AM(UTC)
BarryP

Rank: Member

Groups: Member
Joined: 3/23/2006(UTC)
Posts: 17

Hi (me again), I have added my images to the viewer" One JPG and One GIF. I did some processing and now I want to save. How do I save both images as I have placed them and with all changes? Thanks.
Andrew  
#2 Posted : Sunday, March 26, 2006 5:42:38 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
I did not quite understand the question. Do you mean that you display two images in one bitmap viewer (say, as it done in Floating Image demo application) and want to blend them and save to one file? If yes, you should use DrawOnBitmap method to merge two images together and then use SaveToFile method to save the result to file. Let me know if I misunderstood anything.
BarryP  
#3 Posted : Sunday, March 26, 2006 6:16:48 PM(UTC)
BarryP

Rank: Member

Groups: Member
Joined: 3/23/2006(UTC)
Posts: 17

You understood 100%. I am using the floating image demo. Could you supply me with sample code please? Thanks
Andrew  
#4 Posted : Sunday, April 02, 2006 12:59:42 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
Take a look into the Overlaying Images topic in Graphics Mill manual for more details. I think you will have no problems adapting it with the Floating Image sample.

Edited by user Tuesday, December 15, 2009 10:36:25 AM(UTC)  | Reason: Not specified

Andrew  
#5 Posted : Sunday, April 02, 2006 3:38:01 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
If you are modifying Floating Image app, it may be looking as follows:
Code:
    If FileDialog1.ShowSave Then
        On Error Resume Next
        
            Dim objResult As Bitmap
            ' Copy background to the temporary bitmap
            Set objResult = BitmapViewer1.Bitmap.Clone
             
            ' If you are experience problems with blending because of unmatching pixel formats, it makes sense to 
            ' convert both to RGB: 
            objResult.Data.ConvertTo24bppRgb
            objFloatingImage.Data.ConvertTo32bppArgb

            ' Images are combined here: 
            objFloatingImage.DrawOnBitmap objResult, lngLeft, lngTop, CombineMode:=CombineModeAlpha
        
            objResult.Formats.JpegQuality = 100
            objResult.Formats.JpegIsProgressive = True
            objResult.SaveToFile FileDialog1.FileName
            
        If Err.Number <> 0 Then
            MsgBox "Error arrised during loading image."
            Exit Sub
        End If
    End If
Also, if you are apply imaging operations on a bitmap loaded from GIF file (e.g. change brightness/contrast, etc), do not forget to convert it to 32-bit ARGB.

Edited by user Thursday, December 20, 2007 4:58:09 PM(UTC)  | Reason: Not specified

BarryP  
#6 Posted : Sunday, April 02, 2006 7:26:18 PM(UTC)
BarryP

Rank: Member

Groups: Member
Joined: 3/23/2006(UTC)
Posts: 17

Andrew, Thank you! Thank you! Thank you!! Yes I am/was desperate!!! Again Thank you!!! Regards, Barry
Users browsing this topic
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.