Link to home
Start Free TrialLog in
Avatar of theet
theet

asked on

Display BLOB picture in Datawindow (JPG)

Hello

I am trying to display jpg's in a datawindow. Those pics were stored in a table using UPDATEBLOB.

Now my problem is that I was only able to display BMP's in the datawindow (using an OLE object, Class = Paint.Picture). I am aware that this class only handles bitmaps.

Does anybody know what Class to use in order to display jpg's?

Your answer is very much appreciated.

Thomas

P.S. I am using powerbuilder 11.5
Avatar of jlsilva01
jlsilva01
Flag of Brazil image

try to create a picture object and put the image inside this, like example:

                  // Mostra a foto na tela do colaborador
                  SELECTBLOB imagem INTO  :lb_imagem
                          FROM colaborador
                          WHERE nr_matricula = :ll_matricula ;
                                
                  if len(lb_imagem) = 0 or isnull(lb_imagem) then
                        p_1.PictureName = " "
                        p_1.visible = false
                  else
                        p_1.visible = true
                        p_1.setpicture(lb_imagem)
                  end if

Avatar of theet
theet

ASKER

Thank you for your answer - but I can't use a picture object because I need the pic in a datawindow (one per row)...
1 - Create a datawindow with a picture inside and point the picture address to a temporary folder  defining a standard name, for example idnumber+”.jpg”
2 - Delete all files in temporary folder
3 - Extract all images to that folder using standard name defined
4 - Retrieve datawindow.
Avatar of theet

ASKER

Thank you for this suggestion... But unfortunately that isn't possible in my case. Isn't there a way to display those pictures in a datawindow???
I've requested that this question be closed as follows:

Accepted answer: 500 points for carcarah's comment http:/Q_27412412.html#37099363

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Avatar of theet

ASKER

Is there really no other possible solution???? What about OLE, Active-X or something like that... I really need a solution.
The problem is: you don't have a way to "device" to send the picture from database directly to page. You need a place to extract image before show it in the page.
 I frankly have doubts if maintain images in data base is a good idea. The only good reason to do this would be security issues. If you separate the pictures in a shared folder and insert in the database just picture's address you would have a better performance.

Avatar of theet

ASKER

That's the way we have been doing it. But in large networks it is sometimes hard to get people to save their immages in a public folder so everybody has access... And some of the pictures need to be protected because we're in the health industry. So I really wish there was a solution to this problem....
ASKER CERTIFIED SOLUTION
Avatar of theet
theet

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes this can be done, i create a recognition software and need this behavior, i create a small DW with one parameter the id of image to show, then the main DW include this DW-Image with proper paramter then all was ok.

If you like more then give me advice, but the concept are OK.

Well i dont use show as picture inded i use a picture-ink object to show the picture, in the small Dw.

--- Unless this methode was to Screen, if you try to create a catalog of images the best way are save images to disk then include in the Dw "as string variable" then show as picture.

I hope this usefull to you
Hi Theet,

I do have same problem. I have tried to use inkPicture but it is not working well in my case. Can you help me in this situation. I'm using PowerBuilder 10.5. MySQL 5.5 and MySQL ODBC/Connector 5.1.

Images are save into database MySQL database mediumblob column. from VS 2010, class library. Image format is JPEG.

Well, I'm able to see those images in Picture Control in Window object using SelectBlob. But my issues is to show those images in Datawindow for each row.

Your help will be highly appreciated.

Thanks in advance,
Vishal