Page 3 of 3

Re: Image x xImage quality difference

Posted: Tue Jul 02, 2024 7:32 am
by nageswaragunupudi
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.

Re: Image x xImage quality difference

Posted: Tue Jul 02, 2024 11:38 am
by concentra
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

Re: Image x xImage quality difference

Posted: Tue Jul 02, 2024 6:07 pm
by concentra
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

#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

Re: Image x xImage quality difference

Posted: Tue Jul 02, 2024 6:39 pm
by karinha
Intenta asi:

Code: Select all | Expand

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

Re: Image x xImage quality difference

Posted: Tue Jul 02, 2024 6:56 pm
by concentra
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

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 5:31 am
by nageswaragunupudi

Code: Select all | Expand

@ 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

@ 0,0 PRINT TO oPrn IMAGE "image.tif" NOTRANSPARENT SIZE 8,11 INCHES
OR

Code: Select all | Expand

@ 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

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 5:36 am
by nageswaragunupudi
karinha wrote:Intenta asi:

Code: Select all | Expand

   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()

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 11:24 am
by concentra
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

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 12:45 pm
by karinha
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.

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 2:28 pm
by nageswaragunupudi
But don't you agree that it should work?
It's a bug...
No, not a bug please.

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 3:07 pm
by karinha
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.

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 5:22 pm
by nageswaragunupudi
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().

Re: Image x xImage quality difference

Posted: Wed Jul 03, 2024 7:42 pm
by cmsoft
Estimado Mr. Rao.
En relación a este Post https://forums.fivetechsupport.com/view ... 131d2b175f, habrá alguna solucion ya que trata del uso de PRINT IMAGE ?
Desde ya muchas gracias