1. Resizing bmp/jpg images
- Posted by Reginald Venaglia <austwidefeedlots at bigpond.com> Sep 11, 2006
- 551 views
I am attempting to display either bmp or jpg images on a window. Have been able to load and display an image on the window where required but cannot resize the image to fit in the area allowed of 220x190 pixels. Is there any way under Euphoria to shrink/expand images to any size?. I know there is an API which is reported to do this but it requires a file name as a string. I searched the win32lib but could not see any direct reference to this API. (LoagImageA from Windows User32 dll) Regard Reg.
2. Re: Resizing bmp/jpg images
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 11, 2006
- 556 views
Reginald Venaglia wrote: > > I am attempting to display either bmp or jpg images on a window. > Have been able to load and display an image on the window where required > but cannot resize the image to fit in the area allowed of 220x190 pixels. > Is there any way under Euphoria to shrink/expand images to any size?. > I know there is an API which is reported to do this but it requires a file > name as a string. I searched the win32lib but could not see any direct > reference to this API. (LoagImageA from Windows User32 dll) For Windows platforms you need to look at the stretchBlt function. An example can be found in the demo program that comes with win32lib, "bkGnd16.exw" -- Derek Parnell Melbourne, Australia Skype name: derek.j.parnell
3. Re: Resizing bmp/jpg images
- Posted by "Greg Haberek" <ghaberek at gmail.com> Sep 11, 2006
- 525 views
> I am attempting to display either bmp or jpg images on a window. > Have been able to load and display an image on the window where required > but cannot resize the image to fit in the area allowed of 220x190 pixels. > Is there any way under Euphoria to shrink/expand images to any size?. > I know there is an API which is reported to do this but it requires a file > name as a string. I searched the win32lib but could not see any direct > reference to this API. (LoagImageA from Windows User32 dll) Check out stretchBlt(). I believe its built into Win32Lib 0.59 and up. ~Greg
4. Re: Resizing bmp/jpg images
- Posted by Larry Miller <larrymiller at sasktel.net> Sep 11, 2006
- 566 views
Reginald Venaglia wrote: > > I am attempting to display either bmp or jpg images on a window. > Have been able to load and display an image on the window where required > but cannot resize the image to fit in the area allowed of 220x190 pixels. > Is there any way under Euphoria to shrink/expand images to any size?. > I know there is an API which is reported to do this but it requires a file > name as a string. I searched the win32lib but could not see any direct > reference to this API. (LoagImageA from Windows User32 dll) > Regard Reg. The API function CopyImage() will make a copy of an Icon, Bitmap, or Cursor, given it's handle. There is an option to resize the image to a given width and height. Larry Miller
5. Re: Resizing bmp/jpg images
- Posted by Al Getz <Xaxo at aol.com> Sep 11, 2006
- 528 views
- Last edited Sep 12, 2006
HI there, Just to note, my "WinClass" library comes with a file Bitmaps.ew that has a function in it that loads a bitmap file and resizes it all in one operation so it's pretty fast. This is mainly for use when you have a bitmap that resides in a file and you need to load it and have it display in a given part of the screen without going through too much trouble. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
6. Re: Resizing bmp/jpg images
- Posted by don cole <doncole at pacbell.net> Sep 12, 2006
- 532 views
Hello Reggie, See Deluxe Slide Show in the archives. (Writtem by Me and Al Getz, of course) It is written in WinClass but the size adjustments are the same for Win32lib. It does exactly what you want, it changes to full screen size rather than 220x190 pixels. Don Cole