Jump to content
Sign in to follow this  

bmp jpg gif png tif interconverter dll?

Recommended Posts

Hi. I have made a little screenshot program with captdll.dll (THANKS LAZYCAT! http://www.autoitscript.com/forum/index.ph...amp;hl=captdll)

It works great, with jpg and bmp support, but I would like to have gif, png and tif support too.

I guess the easier way would be to get a converter dll between all five and convert.

However, I have been searching the web for the past few hours and still can't find one...

Any help? Or is there any inbuilt function I missed?

(Oh and are there seperate dll's on the respective official websites?)

Thanks in advance: here's my screenshot part:

;$camtype is the ControlID of a GUICombo with the selections: ".jpg|.bmp"
;$camquality is the ControlID of a GUIInput
;$name is the ControlID of a GUIInput
;$dir is  the ControlID of a GUICombo with the selections: "Desktop|My Docs|My Pics|Hard Disk"

HotKeySet("{ESC}", "Terminate")

$camnumber = 0
$camformat = ""
$file = ""

Func CamInit()
    If $x = 0 Then
        $x = 5
        If GUICtrlRead($camquality) > 100 OR GUICtrlRead($camquality) < 1 Then
            MsgBox("0", "Error", "The JPEG quality only ranges from 1 - 100!")

Func Camera()
    If GUICtrlRead($camtype) = ".bmp" Then
        $camformat = "-1"
    ElseIf GUICtrlRead($camtype) = ".jpg" Then
        $camformat = GUICtrlRead($camquality)
        Case GUICtrlRead($dir) = "Desktop"
            $file = @DesktopDir & "\"
        Case GUICtrlRead($dir) = "My Docs"
            $file = @MyDocumentsDir & "\"
        Case GUICtrlRead($dir) = "My Pics"
            $file = @MyDocumentsDir & "\My Pictures\"
        Case GUICtrlRead($dir) = "Hard Disk"
            $file = @HomeDrive & ":\"
    If FileExists($file & GUICtrlRead($dir2) & GUICtrlRead($name) & $camnumber & GUICtrlRead($camtype)) Then
            $camnumber += 1
        Until NOT FileExists($file & GUICtrlRead($dir2) & GUICtrlRead($name) & $camnumber & GUICtrlRead($camtype))
    If NOT FileExists($file & GUICtrlRead($dir2)) Then
        DirCreate($file & GUICtrlRead($dir2))
    $camfile = $file & GUICtrlRead($dir2) & GUICtrlRead($name) & $camnumber & GUICtrlRead($camtype)
    DllCall("captdll.dll", "int", "CaptureScreen", "str", $camfile, "int", $camformat)
    GUICtrlSetData($status,"Screenshot taken")
    $x = 0
    $camnumber = 0

Func Terminate()

Share this post

Link to post
Share on other sites

I don´t know any dll to do that. But you still use IrFanView command line mode to fit all your needs...

You don´t have to install IrFanView in your computer only the main executable is needed and it can be included in your proyect with FileInstall...

Read IrFanView help file for more info about command line...

Hope that helps :)

Share this post

Link to post
Share on other sites

Hmm, works okay, but increases my total program size by about 170% !!! :D

Maybe I can extract the conversion dll's in IrfanView to use in my program, I think that would be smaller...

Or maybe there's a download page on their forum? :)

Checking now..... :D

EDIT: Argh! There were no png gif jpg bmp tif dll's in the IrfanView directory in the first place.

Stupid me....


Edited by iZafiro

Share this post

Link to post
Share on other sites

Wow! You mean PictView allows people to download their dll's with sample codes?????

I can't wait to try it! *brush my teeth, bathe, eat my breakfast, grab a cup of coke, walk to the computer* Okay now I can start!

Yahoo! Wish me luck!

Share this post

Link to post
Share on other sites

:D:party: When they gave examples in C++, I could only try to understand why they call dll functions with for example PVCloseImage(PVHandle) and not DllCall(something something) :party:

Any help?


Share this post

Link to post
Share on other sites

Oh, I've found a bmp to png dll! It's here at http://windapple.gmxhome.de/ImageConversion.zip.

I really can't get it to work... can any dll expert here help?

I'm trying to understand what's in the gc file that can be opened by notepad....

And here it is (bmp2png convert):

$convertor = DllOpen("ImageConversion.dll")
DllCall($convertor, "int:cdecl", "bmppngconvert", "str", "input.bmp", "str","output.png")

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...