Load, Resize and Save an Image

Load, Resize and Save an Image

Postby vilian » Fri Aug 27, 2021 11:27 am

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

Re: Load, Resize and Save an Image

Postby cmsoft » Fri Aug 27, 2021 7:53 pm

+1
User avatar
cmsoft
 
Posts: 1290
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Load, Resize and Save an Image

Postby nageswaragunupudi » Sat Aug 28, 2021 2:32 am

Code: Select all  Expand view  RUN
   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
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Load, Resize and Save an Image

Postby Marc Venken » Sun Aug 29, 2021 8:52 am

nageswaragunupudi wrote:
Code: Select all  Expand view  RUN
   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.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Load, Resize and Save an Image

Postby vilian » Mon Aug 30, 2021 11:04 am

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

Re: Load, Resize and Save an Image

Postby nageswaragunupudi » Mon Aug 30, 2021 4:03 pm

fwh\source\function\imgtxtio.prg
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10643
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Load, Resize and Save an Image

Postby vilian » Mon Aug 30, 2021 4:51 pm

Thank you ;)
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
User avatar
vilian
 
Posts: 978
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 61 guests