Solved

Image conversion bmp to jpg,gif,tif,png,bmp

Posted on 2004-09-29
6
1,261 Views
Last Modified: 2013-11-19
I have a picturebox which has a bmp image i want to convert the bmp image into gif,jpeg,tif,png format.I searched the web for this, i found few dlls.Those dlls are eval,retail copies.Using these copies i cant build a exe.Can i have a code that converts bmp to gif,jpeg,tif,png so that i can build an exe.

Thanks in advance.                                            
0
Comment
Question by:PradeepYadhav
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:sgayatri
ID: 12188308
If you are on win98 try this soln.
You don't get this in win2000

Add Kodak image edit control (Project >> components >> kodak image edit ) to yur form.
load the image file into the edit control

imgedit1.image="filewithpath"
imgedit1.display

Save the image in the format you need

imgedit1.savepage ............

There are options in savepage method.
Go thru them for each file format, filetype, and compression type.

On the form, Click on the imgedit control.
Press F1 to get full help...
0
 
LVL 6

Expert Comment

by:mmusante
ID: 12188322
0
 
LVL 6

Accepted Solution

by:
mmusante earned 500 total points
ID: 12188391
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 6

Expert Comment

by:mmusante
ID: 12188470
0
 

Expert Comment

by:osmanishaque
ID: 12188536
Dear

Use GDI+ type library for converting Images from one format to other. Please download gdi+.tlb from http://www.xtremevbtalk.com
then write this code you can save image in all types.


Private Sub cmdSave_Click()
  Dim dblPercentage As Double
  Dim lIndex As Long
 
  On Error GoTo errorhandler
  Set bmpOut = New cBitmap
  Set graphic = New cGraphics
 
  If bmpIn.Handle <> 0 Then
    cdl.CancelError = True
    cdl.Flags = cdlOFNOverwritePrompt
    cdl.ShowSave
    If LenB(cdl.FileName) Then
      ' GDI+ bug, must delete old file first
      If LenB(Dir$(cdl.FileName)) Then Kill cdl.FileName
      dblPercentage = hsbResize.Value / 100
      bmpOut.CreateFromScan0 bmpIn.Width * dblPercentage, bmpIn.Height * dblPercentage, 0, bmpIn.PixelFormat, 0
      graphic.GetGraphicsContext bmpOut.Handle
      lIndex = bmpIn.ExtensionExists("*.bmp")
      If lIndex > -1 Then
        graphic.SetInterpolationMode InterpolationModeHighQualityBilinear
        graphic.DrawImageRectI bmpIn.Handle, 0, 0, bmpIn.Width * dblPercentage, bmpIn.Height * dblPercentage
        bmpOut.SaveToFile cdl.FileName, bmpIn.EncoderGuid(lIndex), 0
      End If
    End If
  End If
 
errorhandler:
  Set graphic = Nothing
  Set bmpOut = Nothing
  ' err silently
End Sub


You can also use Kodak ImageEdit , Kodak Image Admin controls and save Image as you want.

feel free to contact more.
0
 

Expert Comment

by:osmanishaque
ID: 12188545
Dear Sorry

You can also download code from this

http://www.xtremevbtalk.com/showthread.php?t=77960

Thanks

Osman Ishaque
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
In this tutorial viewers will learn how to create blended and gradiated shapes in Illustrator using the blend tool Draw two shapes, one of them in a different color: Select both and create a blend by going to Object > Blend > Make: Blends can also b…
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

731 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question