Jpg resolution going down in Ximage ?

Jpg resolution going down in Ximage ?

Postby Marc Venken » Tue Nov 22, 2016 9:21 pm

Hello,

I use this to show a image.

@ 32,860 XIMAGE oImage2 SIZE 550,-300 OF oWnd SOURCE foto->foto

I see that the image's quality is going down when viewed with FWH compared with the view from let say Xnview.

1. Is this normal behavior for a FWH program (15.12 32 bit system)

Marc
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1431
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Jpg resolution going down in Ximage ?

Postby Antonio Linares » Tue Nov 22, 2016 10:00 pm

Marc,

Could you please provide one of the JPGs that you are testing ?

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Jpg resolution going down in Ximage ?

Postby nageswaragunupudi » Wed Nov 23, 2016 5:45 pm

How about IMAGE instead of XIMAGE?

TXImage class uses GDI+ for both reading and rendering all images.
TImage class uses FreeImage.dll for reading and classic GDI class for rendering images.

You may choose what do you consider better and also share your observation.
Regards

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

Re: Jpg resolution going down in Ximage ?

Postby Marc Venken » Wed Nov 23, 2016 9:31 pm

Rao,

I use the standards of FWH

when i change to

@ 40,860 IMAGE oImage2 SIZE 550,450 OF oWnd SOURCE foto->foto

i get the error

.\TEST1.PRG(212) Error E0030 Syntax error "syntax error at 'SOURCE'"

Because i think i don't have some libs linked in. I'm not used to link stuff into FWH or any part of it. Put a extra ch file on top I can do.

Marc
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1431
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Jpg resolution going down in Ximage ?

Postby Marc Venken » Wed Nov 23, 2016 9:42 pm

Here a screenshot for the difference look.

Image
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1431
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Jpg resolution going down in Ximage ?

Postby nageswaragunupudi » Thu Nov 24, 2016 12:13 am

Syntax of Image is different
You do not need a separate ch. You play please check the full syntax in fivewin.ch.

@ r, c IMAGE SIZE w,h PIXEL OF oDlg FILE "c:\.....jpg"

As suggested by Mr Antonio, please send him the jpg file
Regards

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

Re: Jpg resolution going down in Ximage ?

Postby nageswaragunupudi » Thu Nov 24, 2016 4:18 pm

Here is a sample program to try:
Code: Select all  Expand view
function ImageTestNew

   local oDlg, oImage

   DEFINE DIALOG oDlg SIZE 1120,630 PIXEL TRUEPIXEL TITLE FWVERSION + " XImage from Web"

   @ 20,20 XIMAGE oImage SOURCE "http://www.kaboutersopglabbeek.be/img/fwh.jpg" ;
      SIZE -20,-20 OF oDlg

   oImage:FitWidth()
   oImage:lBmpTransparent := .f.

   ACTIVATE DIALOG oDlg CENTERED

return nil
 


Result:
Image

Using TImage class:

Image

It can be seen that XImage display the jpg posted above with fair fidelity. We opine that both XImage and Image controls render images faithful the original. At the same time FWH does not provide any image enhancing features like some specialized imaging software, whose only job is to render images.
Regards

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

Re: Jpg resolution going down in Ximage ?

Postby mastintin » Fri Nov 25, 2016 7:58 am

Can you put me a link to download the image?

Thank you.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 103 guests