Image x xImage quality difference

Re: Image x xImage quality difference

Postby nageswaragunupudi » Tue Jul 02, 2024 7:32 am

Notes:
TImage uses freeimage.dll for reading images and classic GDI for display.

TBitmap uses classic GDI for reading bmp files and gdi+ for reading other images (as hbitmap) and uses classic GDI for display.

TXImage uses GDI+ to read images as gdi+ image pointer and display using gdi+.

We advise migrating to TXImage, which provide many more features than TBitmap and TImage and we can also do away with freeimage.dll.

In the near future we will be providing adjustment of brightness, contrast and gamma with XImage to finetune the appearance of the images.
Regards

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

Re: Image x xImage quality difference

Postby concentra » Tue Jul 02, 2024 11:38 am

nageswaragunupudi wrote:We resolved the issue with gdi+.
FIX:


Thanks for the fix!

nageswaragunupudi wrote:as good as Microsoft Photo.
This is a screenshot comparing Microsoft Photo (left) and xImage(right)


I will ask permission to disagree.
To me, here and in your sample image, Microsoft Photo is still better than xImage.
This is not a show stopper, but, to me, it's noticeable.

Maurício Ventura Faria
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Image x xImage quality difference

Postby concentra » Tue Jul 02, 2024 6:07 pm

Hi.

Now I am having an issue with printing.

I need to print the image as a full page in the width ( or near this ).

Please, see this code:
Code: Select all  Expand view  RUN

#include "Fivewin.ch"

FUNCTION MAIN()

   LOCAL oWnd
   LOCAL oXImage
   LOCAL cFile := "Image.tif"

   DEFINE WINDOW oWnd FROM 0,0 TO GetSysMetrics(1)-90,GetSysMetrics(0)/2 TITLE "FiveWin Images" PIXEL

   @ 10,10 XIMAGE oXImage SIZE oWnd:nWidth-40,oWnd:nHeight-60 SOURCE FILOADIMG(cFile) OF oWnd
   oXImage:lBmpTransparent := .f.
   oXImage:FitWidth()

   ACTIVATE WINDOW oWnd ON INIT DoPrint( oXImage )

Return nil


Function DoPrint( oXImage )

   local oPrn

   PRINT oPrn NAME "Image Printing" FROM USER PREVIEW

      msginfo( "oXImage:nImgWidth     " + STR(oXImage:nImgWidth) + chr(13)+chr(10) +;
               "oXImage:nImgHeight    " + STR(oXImage:nImgHeight)+ chr(13)+chr(10) +;
               "oPrn:nHorzRes()       " + STR(oPrn:nHorzRes())   + chr(13)+chr(10) +;
               "oPrn:nVertRes()       " + STR(oPrn:nVertRes())   + chr(13)+chr(10) +;
               "oPrn:nLogPixelX()     " + STR(oPrn:nLogPixelX()) + chr(13)+chr(10) +;
               "oPrn:nLogPixelY()     " + STR(oPrn:nLogPixelY()) + chr(13)+chr(10)   )


      PAGE
         @ 0,0 PRINT TO oPrn IMAGE oXImage NOTRANSPARENT SIZE 8,11 INCHES
      ENDPAGE
      PAGE
         @ 0,0 PRINT TO oPrn IMAGE oXImage NOTRANSPARENT SIZE 780,1100 PIXEL
      ENDPAGE
   ENDPRINT

Return Nil
 


The print preview:

Image

In the first page, I am getting part of the image with a big zoom.
In the second one, I got the full page image by try and error...

The MsgInfo() info when I select the Epson:

Image

I got the very same result, no matter if I select an Epson inkjet or Microsoft Print to PDF.
Can anyone point me what am I doing wrong ?

[[]] Maurício Faria
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Image x xImage quality difference

Postby karinha » Tue Jul 02, 2024 6:39 pm

Intenta asi:

Code: Select all  Expand view  RUN

   oPrn:SayImage( 150, 500, "IMAGE.TIF", 3900, 6500 )
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Image x xImage quality difference

Postby concentra » Tue Jul 02, 2024 6:56 pm

Hi Corinthiano Triste... :(

karinha wrote:   oPrn:SayImage( 150, 500, "IMAGE.TIF", 3900, 6500 )
Regards, saludos.


How did you calculate the 3900 and 6500 values ?

[[]] Outro Corinthiano Triste
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Image x xImage quality difference

Postby nageswaragunupudi » Wed Jul 03, 2024 5:31 am

Code: Select all  Expand view  RUN
@ 0,0 PRINT TO oPrn IMAGE oXImage NOTRANSPARENT SIZE 8,11 INCHES


Please do not print oXImage. Use file name like this:
Code: Select all  Expand view  RUN
@ 0,0 PRINT TO oPrn IMAGE "image.tif" NOTRANSPARENT SIZE 8,11 INCHES


OR

Code: Select all  Expand view  RUN
@ 0,0 PRINT TO oPrn IMAGE oXImage:uSource  NOTRANSPARENT SIZE 8,11 INCHES


This works well.

For information:
We need not always specify the size. If we omit the SIZE clause maximum width and height required for the image is used (within the limits of the physical size of the page) and return the next row to be printed
Regards

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

Re: Image x xImage quality difference

Postby nageswaragunupudi » Wed Jul 03, 2024 5:36 am

karinha wrote:Intenta asi:

Code: Select all  Expand view  RUN

   oPrn:SayImage( 150, 500, "IMAGE.TIF", 3900, 6500 )
 


Regards, saludos.


The method SayImage() is old and obselete.
Please use PrintImage() and much better use the command syntax.
Kindly do not advise users to use SayImage()
Regards

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

Re: Image x xImage quality difference

Postby concentra » Wed Jul 03, 2024 11:24 am

nageswaragunupudi wrote:Please do not print oXImage.

Ok, understood.
But don't you agree that it should work?
It's a bug...

[[]] Maurício Faria
User avatar
concentra
 
Posts: 124
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Image x xImage quality difference

Postby karinha » Wed Jul 03, 2024 12:45 pm

Rao:

The method SayImage() is old and obselete.
Please use PrintImage() and much better use the command syntax.
Kindly do not advise users to use SayImage()


I like and have been using the SAYIMAGE() command for a long time, I don't see any problems with this command. On the contrary, I had problems with the PRINTIMAGE() command. The good thing about FiveWin is that it always has more than one COMMAND and everyone chooses what suits them best at any given moment.

Me gusta y he estado usando el comando SAYIMAGE() durante mucho tiempo, no veo ningún problema con este comando. Por el contrario, tuve problemas con el comando PRINTIMAGE(). Lo bueno de FiveWin es que siempre tiene más de un COMANDO y cada uno elige lo que más le conviene en cada momento.

Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Image x xImage quality difference

Postby nageswaragunupudi » Wed Jul 03, 2024 2:28 pm

But don't you agree that it should work?
It's a bug...

No, not a bug please.
Regards

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

Re: Image x xImage quality difference

Postby karinha » Wed Jul 03, 2024 3:07 pm

nageswaragunupudi wrote:
But don't you agree that it should work?
It's a bug...

No, not a bug please.


Maurício, Master Nages is right. You didn't say what version your FWH is. You see, I had problems with the PRINTIMAGE() command, in version: FWH1905, since then, the command must have undergone incredible improvements. So, at the time, what "saved" me was SAYIMAGE(), and of course today PRINTIMAGE() must be much better than SAYIMAGE(), what you need is to respect the SYNTAX of the command. OK?

Mauricio, el maestro Nages tiene razón. No dijiste qué versión es tu FWH. Verás, tuve problemas con el comando PRINTIMAGE(), en la versión: FWH1905, desde entonces, el comando debe haber sufrido mejoras increíbles. Entonces, en su momento, lo que me "salvó" fue SAYIMAGE(), y por supuesto hoy en día PRINTIMAGE() debe ser mucho mejor que SAYIMAGE(), lo que hay que hacer es respetar la SYNTAX del comando. ¿DE ACUERDO?

Maurício, mestre Nages tem razão. Você não disse qual é a versão do seu FWH. Veja bem, eu tive problemas com o comando PRINTIMAGE(), na versão: FWH1905, de lá para cá, o comando deve ter sofridos melhorias incríveis. Então, na época, o que me "salvou", foi o SAYIMAGE(), e lógico que hoje o PRINTIMAGE() deve estar bem melhor que o SAYIMAGE(), o que você precisa, é respeitar a SINTAXE do comando. ok?

Gracias, tks.

E VAI CORINTHIANS!! hahahahahahahaha. Abraços.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Image x xImage quality difference

Postby nageswaragunupudi » Wed Jul 03, 2024 5:22 pm

I had problems with the PRINTIMAGE() command, in version: FWH1905,

Please let us know any situations where SayImage() works and PrintImage() does not, whether in FWH1905 or now.
We will look into the issues and fix them where necessary on an urgent basis.
FWH created PrintImage() with the intention of superseding SayImage().
Regards

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

Re: Image x xImage quality difference

Postby cmsoft » Wed Jul 03, 2024 7:42 pm

Estimado Mr. Rao.
En relación a este Post https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44611&sid=8cd5d8cb8a00f580aa199d131d2b175f, habrá alguna solucion ya que trata del uso de PRINT IMAGE ?
Desde ya muchas gracias
User avatar
cmsoft
 
Posts: 1290
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests