I Have problem with resolution of image

forum.td.development (2005-2010)
aleksei mendez

I Have problem with resolution of image

Post by aleksei mendez » 12 Feb 2009, 01:51

 Posted by:  aleksei mendez 

Hi, I retrive image from sqlserver 2005
for this I'm use this sentences

Windows Variables
Long String: strFOTO

Picture: picFOTOx
On SAM_Create

Set SqlDatabase = 'EMPLOYEE'
Set SqlUser = 'sa'
Set SqlPassword = 'sa'
!
Call SqlImmediate ( 'SELECT FOTOGRAFIA INTO :strFOTO FROM
EMPL_FOTOS WHERE COD_EMPLEADO = 50210001' )
!
Call SalPicClear ( picFOTOx )
!
! Call SalPicSetImage ( picFOTOx, strFOTO, PIC_ImageTypeBMP )
Call SalPicSetString ( picFOTOx, PIC_FormatObject , strFOTO )

but thi resolution es very poor

today I solved this temporarily, with change the resolution to 16 bits

Wath can I do?
Any ideas?

Thank You.

Dmytro G

I Have problem with resolution of image

Post by Dmytro G » 12 Feb 2009, 12:22

 Posted by:  Dmytro G 

Hello.

Look at attached sample. Notice that if you write

Call SalPicSetString( picFOTOx, PIC_FormatObject, lsFOTO )

the image is indeed poor.

But if you use PIC_FormatBitmap instead of PIC_FormatObject,

the picture looks great.

I suspect that you should pay special attention to the format of the image
which is saved in database or use PIC_FormatBitmap as parameter.

Dmytro G.

Attachment: TestPicture.rar

aleksei mendez

I Have problem with resolution of image

Post by aleksei mendez » 12 Feb 2009, 16:58

 Posted by:  aleksei mendez 

Ok, yes I'm try this before

But when you use a different size and adjust the image with "Call
SalPicSetFit( picFOTOx, PIC_FitBestFit, 0, 0 )", you lost resolution, But,
if you have 16 bits in windows resolution, in the resize you don't have this
lost Attach my test

Attachment: Foto.rar

aleksei mendez

I Have problem with resolution of image

Post by aleksei mendez » 12 Feb 2009, 17:37

 Posted by:  aleksei mendez 

It's the same problem with the reports, but in this time i'm try with Forms

Return to “td.development”

Who is online

Users browsing this forum: [Ccbot] and 0 guests