Load, Resize and Save an Image

Post Reply
User avatar
vilian
Posts: 985
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Load, Resize and Save an Image

Post by vilian »

Hi Guys,
What is the best way to load an image (JPG file), resize and save it ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
cmsoft
Posts: 1297
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina
Been thanked: 2 times

Re: Load, Resize and Save an Image

Post by cmsoft »

+1
User avatar
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

Post by nageswaragunupudi »

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
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Load, Resize and Save an Image

Post by Marc Venken »

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
User avatar
vilian
Posts: 985
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Load, Resize and Save an Image

Post by vilian »

Thank you Mr Rao ;)

Is there any doc with an explanation about this fw_ image functions and its parameters ?
I would like to know more about these functions ;)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
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

Post by nageswaragunupudi »

fwh\source\function\imgtxtio.prg
Regards

G. N. Rao.
Hyderabad, India
User avatar
vilian
Posts: 985
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: Load, Resize and Save an Image

Post by vilian »

Thank you ;)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Post Reply