Hi Guys,
What is the best way to load an image (JPG file), resize and save it ?
Load, Resize and Save an Image
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Load, Resize and Save an Image
Code: Select all | Expand
aBmp := FW_ReadImage( nil, "c:\fwh\bitmaps\olga1.jpg", { 176, 225 } ) // Load resized image
FW_SaveImage( aBmp[ 1 ], "olgasmal.jpg", 100 )
PalBmpFree( aBmp )
Original size of olga1.jpg is 352x450 px. Loaded with size 176x225 and then saved.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Marc Venken
- Posts: 1485
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: Load, Resize and Save an Image
nageswaragunupudi wrote:Code: Select all | Expand
aBmp := FW_ReadImage( nil, "c:\fwh\bitmaps\olga1.jpg", { 176, 225 } ) // Load resized image
FW_SaveImage( aBmp[ 1 ], "olgasmal.jpg", 100 )
PalBmpFree( aBmp )
Original size of olga1.jpg is 352x450 px. Loaded with size 176x225 and then saved.
Previous there has been issues about the saved quality. (time ago) Is this current way keeping the quality good ? Will test it, but general speeking ....?
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
Re: Load, Resize and Save an Image
Thank you Mr Rao ![Wink ;)](./images/smilies/icon_wink.gif)
Is there any doc with an explanation about this fw_ image functions and its parameters ?
I would like to know more about these functions![Wink ;)](./images/smilies/icon_wink.gif)
![Wink ;)](./images/smilies/icon_wink.gif)
Is there any doc with an explanation about this fw_ image functions and its parameters ?
I would like to know more about these functions
![Wink ;)](./images/smilies/icon_wink.gif)
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: Load, Resize and Save an Image
fwh\source\function\imgtxtio.prg
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India