1. Roger
  2. Valentina Studio
  3. Понедельник, Май 03 2021, 09:50 PM
  4.  Подписаться через 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
Комментарий
There are no comments made yet.
Roger Ответ принят
Many thanks Sergey.

Sorry I had not read your respons completly correct.

VBLob.ToFIle was my problem.

Have a nice day Roger
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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.
Комментарий
There are no comments made yet.
Roger Ответ принят
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?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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
Ссылки
  1. https://www.dropbox.com/s/1e0dp1o6imllesv/image_export_example.zip?dl=0
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
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?
Комментарий
There are no comments made yet.
Roger Ответ принят
Thanks Sergey,

I have never worked with forms, how can I found the example?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello Roger,

It should be possible with Valentina Forms, I’ll add an example.
Комментарий
There are no comments made yet.
  • Страница :
  • 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