Sign in to follow this  
Followers 0
AJJ

Resize an Image

6 posts in this topic

are there any really simple scripts that i are around that will simply resize an image - you put one in, it resizes it and you take it out?

Share this post


Link to post
Share on other sites



I can think of a few ways.

ImageMagick

GDI+

All you now need to do is SEARCH for it. Not too complicated :) If you've got nearly 40 posts already, I thought you would be able to work that out before you posted...

Share this post


Link to post
Share on other sites

i did find a couple of scripts but the code didnt work for some reason, i think it wasnt finished. i have no ideas about the coding myself, (im a designer) but knew the system is quite dynamic and probably there would be something to do the job.

so does anyone know of a good code that i can put into autoit so i can compile it and give it to someone who doesnt even know how to use paint! lol

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I made some UDFs for FreeImage: FreeImage Libvrary

Example:

#include <FreeImage.au3>

_FreeImage_LoadDLL(@ScriptDir&"\FreeImage.dll")
_FreeImage_Initialise()

$sFile = "800x600.jpg"
; new sizes
$width = 400
$height = 300

$FIF = _FreeImage_GetFileTypeU($sFile)
If $FIF = $FIF_UNKNOWN Then
    $FIF = _FreeImage_GetFIFFromFilenameU($sFile)
EndIf
$hImage = _FreeImage_LoadU($FIF, $sFile)

$hImageResized = _FreeImage_Rescale($hImage, $width, $height, $FILTER_LANCZOS3)
$dot = StringInStr($sFile,".",1,-1)
$Name = StringLeft($sFile,$dot-1)
$Ext = StringMid($sFile,$dot)
_FreeImage_SaveU($FIF, $hImageResized, $Name &"_rsz"&$Ext)
_FreeImage_Unload($hImage)
_FreeImage_Unload($hImageResized)

_FreeImage_DeInitialise()
Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I made some UDFs for FreeImage: FreeImage Libvrary

ProgAndy, I have no words. It is excellent! I have long wanted to make a UDF for FreeImage, but not proceeded with the case... Of course, I have not tested your UDF, but in the near future be sure to do so. x8 thanks to you, ProgAndy. Well done.

:)

EDIT: Maestro, I think you need to place this UDF in Example Scripts section. I will be happy to give you 5 stars.

Edited by Yashied

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  
Followers 0