1. Roger
  2. Valentina Studio
  3. Monday, May 03 2021, 09:50 PM
  4.  Subscribe via email
Hello

Is it possible to export a selected lot of pictures (saved in picture fields in Valentina db) with Studio? The Excel Export from all not helps because the images are very, very small in the table and as i see I cannot select the range.

For export pictures as original size (jpg) not exist a example code? (Xojo)

Save in Studio only oneis not the idea for 40 or 50 images.

Best regards Roger
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Roger,

It should be possible with Valentina Forms, I’ll add an example.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 1
Roger Accepted Answer
Thanks Sergey,

I have never worked with forms, how can I found the example?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 2
Sergey Pashkov Accepted Answer
In the third column of Start Page, ‘car_catalog’ contains examples.

I’ll add more specific example soon.
How do you want to set the range to export images - with SQL?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 3
Sergey Pashkov Accepted Answer
I attached an example - it saves pictures from one field of one table to the desired folder, it is also possible to apply a filter, so only a subset of records is exported.
As for the Valentina Studio, it is the only way to do it.
But editing forms requires a Pro license.

The same can be achieved with Xojo application, there is no exact example.
The closest is V4RB_11/Examples/API_way/Field_Picture

It reads a picture in moveTo method:
pic = fld.ReadPicture()
ImageWell1.Image = fld.ReadPicture()

You can save this picture using the standard method

Also, VBlob field can be used to write the file directly:
VBlob.ToFile
References
  1. https://www.dropbox.com/s/1e0dp1o6imllesv/image_export_example.zip?dl=0
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 4
Roger Accepted Answer
Ohh, yes forms shows very interesting. I have the pro license. :)

I made before a view months an application with Xojo, the filter for the reports I made wirth a ComboBox (all car brands like all Mercedes or so). It works very fine.

In this case now I have the wish to select manually more then one and/or with a ComboBox can be nice too. - But my question is today how can I save the selected pictures as a jpg file to use its for other things?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 5
Sergey Pashkov Accepted Answer
Probably the fastest way is to use Xojo as a familiar tool.

The overall algorithm would be:
1. Create a target folder
2. Execute a query that selects necessary images
3. Iterate over returned rows and save images with sequential names to the target folder using VBlob.ToFile method

--
As I wrote before - from within the Valentina Studio it is possible only with Forms and JavaScript, the algorithm is pretty much the same.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 6
Roger Accepted Answer
Many thanks Sergey.

Sorry I had not read your respons completly correct.

VBLob.ToFIle was my problem.

Have a nice day Roger
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 7
  • Page :
  • 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. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories