1. Helge Tjelta
  2. Valentina Database ADK
  3. Freitag, Oktober 16 2015, 11:50 AM
  4.  Abonnieren via E-Mail
Hi, how do I get a picture from a db into my web app... ?

In desktop app, i have the VPicture available, but when doing a Webapp, VPicture is gone.... WHY

using V4RB 5.8.5
Kommentar
There are no comments made yet.
Helge Tjelta Akzeptierte Antwort
I ment 5.8.8, also checked the new 6.0.10. Still no VPicture

Do I have to go BLOB ?
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
web application is a console application.

as I remember, for console-safe apps in SDK of Xojo was disabled all picture-related methods.
so we also was need disable them

yes you can try get PNG or JPG using BLOB methods.
Kommentar
There are no comments made yet.
Helge Tjelta Akzeptierte Antwort
but we have imagewell as an object for web apps, and use icons and pictures all over the place... I don't get it. ?
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
well, we can check once again this point.
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
I was wrong.

{ (REALproc) Picture_Read, REALnoImplementation, "ReadPicture as Picture", REALconsoleSafe },

{ (REALproc) Picture_WriteAs, REALnoImplementation,
"WritePictureAs( inPict as Picture, inPictType as Integer = 20, inQuality as Integer = 50 )",
REALconsoleSafe },

Methods are console-safe.
Then we need check this from another point of view.

Sergey we have own example with pictures?
Kommentar
There are no comments made yet.
Helge Tjelta Akzeptierte Antwort
Nice, I'm waiting :)
Kommentar
There are no comments made yet.
Ruslan Zasukhin Akzeptierte Antwort
Sergey points that class VPicture itself is marked as NOT console safe.

Helge, meanwhile try to use VCursosr.BlobField() to extract compressed JPG and send it to browser
Kommentar
There are no comments made yet.
Johnny Harris Akzeptierte Antwort
I grabbed this snippet of code from a web project I have, hopefully it will work for you.


dim mb as MemoryBlock = cur.BlobField("profile_img").ReadData()
dim p as Picture

if mb <> nil then
p = Picture.FromData( mb )
user.Profile.Image = p
end if
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories