STATIC FUNCTION SHOW_IMGAGE(oDlg, cDestFile)
LOCAL oDlg1, oTest, nImgWidth, nImgHeight
DEFINE IMAGE oTest FILENAME c_Path1 + cDestFile
// needed for dialog-size
nImgWidth := oTest:nWidth
nImgHeight := oTest:nHeight
// is used, to make it possible, to show a image RESIZED
oBrush := TBrush():new( ,,,, ResizeBmp( oTest:hBitmap, nImgWidth, nImgHeight, .T. ) )
oTest:End()
DEFINE DIALOG oDlg1 TITLE "EXPORT-IMAGE" FROM 0, 0 TO nImgHeight, nImgWidth PIXEL
ACTIVATE DIALOG oDlg1 CENTER ;
ON INIT oDlg1:SetBrush( oBrush )
oBrush:End()
RETURN( NIL )
cnavarro wrote:but the control should be drawn with the same size as the image you want to upload.
cnavarro wrote:Thanks for your interest
AUTORESIZE clause?
Well, it may be, I want to load an image of 150x100, for example, and the control that contains it also has the size 150x100, nothing more.
cnavarro wrote:Enrico
Sure I'll use SetSize, I was just researching and asking if anyone knew that the monitoring was twice the size of the image, or was I knew not use the IMAGE command.
cnavarro wrote:And also, by investigating the size of the image you get in C has 4 pixels less in width and height than that obtained in FWH
Enrico Maria Giordano wrote:Cristobal,
I already answered: TImage, as any other control, doesn't automatically resize to its content.
EMG
ukoenig wrote:Cristobal,
this solution is included : a preview of the exported image.
I'm showing a little 3D-effect at the imageborder, but it can be flat.
Like You can see, it is the same size, embedded inside the dialog.
I got extended test as well, in case You want to show ALPABLENDED bmp's
Best regards
Uwe
cnavarro wrote:Prepare an example you can compile
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: nageswaragunupudi and 59 guests