Board index » delphi » JPG Resize ?
Melon
Delphi Developer |
Fri, 18 Apr 2003 02:30:13 GMT
|
Melon
Delphi Developer |
Fri, 18 Apr 2003 02:30:13 GMT
JPG Resize ?
Does anyone know where I could find a *freeware* component for Delphi 3 that
resizes JPG files ? I need to make a program that makes a HTML file with a list of thumbnails of jpg files. I'm kinda a newbie, but I think I can handle the rest. Thank you for your time. |
GRS
Delphi Developer |
Fri, 18 Apr 2003 04:53:04 GMT
Re:JPG Resize ?Quote"Melon" <melon_d...@hotmail.com> wrote in message news:8thqg0$g45$1@news.clinet.fi... I've written an app in D2 which does just that. You can d/l it here: http://perso.worldonline.fr/gstewart/en/ Look for Sort'em V1.0 GRS |
Melo
Delphi Developer |
Wed, 23 Apr 2003 06:16:06 GMT
Re:JPG Resize ?Could you pleeease send me the source or upload it somewhere ? Please ? I'm a newbie, please help... Quote"GRS" <nospamplease.pontille_at_bigfoot.com> wrote in message Quote"Melon" <melond...@hotmail.com> wrote in message Quote> Does anyone know where I could find a *freeware* component for Delphi 3 I've written an app in D2 which does just that. You can d/l it here: http://perso.worldonline.fr/gstewart/en/ Look for Sort'em V1.0 GRS |
GRS
Delphi Developer |
Wed, 23 Apr 2003 03:00:00 GMT
Re:JPG Resize ?Quote"Melon" <melond...@hotmail.com> wrote in message news:8tvdg0$1fd$1@news.clinet.fi... This is a shareware I wrote, which means that I'm trying to earn a bit of money with it. It also means that there's no way I'm going to share the complete source code with anyone, but what I can and will do willingly is give you some tips and guidelines. First of all, you'll need a component which handles JPEG images. Delphi 3 already has a "Jpeg" unit you can use to handle JPEG images but I don't know how to use it since I don't have D3. You can find the component I use (and find perfectly satisfactory) at Torry's under VCL / Graphics / JPG Images, look for "TJPEGImage and TDBJPEGImage v.1.3". The installation of this component is well documented in the .zip file you'll d/l and decompress. BTW, Torry's is in the process of moving. The place to go for the minute is www.torry.net and from there to a mirror site. Basically a TJPEGImage is a component derived from the standard TImage you get with Delphi. It works in much the same way except that the TJPEGImage.Picture.SaveToFile and TJPEGImage.Picture.LoadFromFile methods accept filenames with .jpg, .jpe, .jpeg and .jfif extensions. Other than that you use it exactly as you would a TImage and you can manipulate the image itself with the TJPEGImage.Picture.Bitmap.Canvas property. Look up and read about the following components in your online help files: TImage Pay special attention to the TCanvas.StretchDraw method which you'll be using to downsize your images to thumbnail size. HTH's GRS |
Melo
Delphi Developer |
Wed, 23 Apr 2003 03:00:00 GMT
Re:JPG Resize ?Thanks alot (anyway) ! I've still got another question.. How can I make a program that lets the user select a directory and then the program makes thumbnails of all the files inside ? I noticed that you had this function in your proggie. It would just need to get the files to be added to a TList, from there I can handle the rest. And one more thing... thanks ! Quote"GRS" <nospamplease.pontille_at_bigfoot.com> wrote in message Quote"Melon" <melond...@hotmail.com> wrote in message Quote> Could you pleeease send me the source or upload it somewhere ? This is a shareware I wrote, which means that I'm trying to earn a bit of First of all, you'll need a component which handles JPEG images. Delphi 3 BTW, Torry's is in the process of moving. The place to go for the minute is Basically a TJPEGImage is a component derived from the standard TImage you Look up and read about the following components in your online help files: TImage Pay special attention to the TCanvas.StretchDraw method which you'll be HTH's GRS |
GRS
Delphi Developer |
Wed, 23 Apr 2003 03:00:00 GMT
Re:JPG Resize ?Quote"Melon" <melond...@hotmail.com> wrote in message news:8u1hqo$8co$1@news.clinet.fi... I used the SHBrowseForFolder API call for this. The chances are you can use this by adding the ShellAPI unit to your "uses" clause - best thing is for you to look it up in your OLH. Alternatively, you can use the SelectDirectory function in your FileCtrl unit. I didn't use it in this instance because I have a French version of Delphi with a French VCL - things would have looked pretty wierd with everything else in English! Once you've established which directory should be processed you can iterate through all the files and folders using the FindFirst/FindNext/FindClose trio. HTH's GRS |