Page 1 of 1

iMAGE WITDH AND hEIGHT

Posted: Sun Apr 16, 2006 10:15 pm
by Silvio
if I have an 377x314 image I must put on a dialog this image but
if I write
@ 2,5 IMAGE oImg SIZE 377,314 OF oDlg

the image is too big

why ?

Posted: Sun Apr 16, 2006 11:13 pm
by Antonio Linares
Please provide the used image. Place it at www.hyperupload.com and provide the download link.

Posted: Sun Apr 16, 2006 11:33 pm
by Silvio

Posted: Mon Apr 17, 2006 9:18 am
by Enrico Maria Giordano
I confirm the problem. It seems a bug in TBitmap. This is a sample:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBmp

    DEFINE DIALOG oDlg;
           SIZE 700, 500

    @ 1, 1 BITMAP oBmp FILE "c:\fwharbour\bitmaps\magic.bmp" SIZE 320, 200

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG

Posted: Mon Apr 17, 2006 11:32 am
by Antonio Linares
Silvio, Enrico,

As a temporary workaround you may do:

Code: Select all

    ACTIVATE DIALOG oDlg; 
             CENTER ;
             ON INIT oBmp:SetSize( 320, 200 ) 

Posted: Mon Apr 17, 2006 11:37 am
by Antonio Linares
If I am not wrong, its not a bug, as when using a DIALOG and specifying SIZE clause, we are managing dialogs units, not pixels.

Posted: Mon Apr 17, 2006 1:09 pm
by Enrico Maria Giordano
I agree. TBitmap behavior is consistent with the other controls.

EMG

Posted: Mon Apr 17, 2006 11:37 pm
by Silvio
thanks to all