sorry, I still don't understand your problem.

EMG
Code: Select all
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 )
So do you want an AUTORESIZE clause for TImage (or sort of)? If yes, you have to ask to Antonio, sorry.cnavarro wrote:but the control should be drawn with the same size as the image you want to upload.
And please, why can't you use SetSize()? I still don't understand, I'm very sorry...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.
I already answered: TImage, as any other control, doesn't automatically resize to its content.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.
I can't replicate this behavior, sorry. Can you show me a little sample?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
I already knewEnrico Maria Giordano wrote:Cristobal,
I already answered: TImage, as any other control, doesn't automatically resize to its content.
EMG
Uweukoenig 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
Thank you, I'm curious now.cnavarro wrote:Prepare an example you can compile