×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VPF convert file

VPF convert file

VPF convert file

(OP)
We're using a program that reads VPF files using a SQLite format to work pulling the data from a database of images.
I would like to take a single file or image like vector gif or PPT convert them into this this VPF format so we can view them within the program.
I attempted changing file extensions and using conversion software without any luck. Con any one help?

RE: VPF convert file

VPF or VFP firstly?

I think we need more info as well

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0

RE: VPF convert file

Let us understand this better. The software you use can't work with image files, but it can take an image stored in an SQLite database?

Do you know how images are stored there?

You've come to a VFP forum, neither an SQLite nor a VPF forum. Unless you have a typo, but I think you literally mean VPF vecor map images, that's what I find VPF files are, and in context of vector gif or ppt that matches the topic of vector graphics.

Well, if you download and install SQLite you could find out how images are stored in there. Generally speaking databases are not image storages per se, images are foreign objects for databases and only treatable as a "binary large object" (blob), which is just a fancy way to say that databases just store image file bytes as is (and also any other file formats), with no changes.

The only way that your software would depend on SQLite would be if it is hardwired to take an image from some specific blob field of some specific table within a SQLite database.

So you wouldn't need to convert an image to an SQLIte database file, you would need to know what table and field name your softwre expects to find in an SQLite database, create such an empty database and store the image there. I wonder if it wouldn't be easier to change the software to take a file instead of needing SQLite as vehicle to retrieve the image, because what it will get from the SQLite database is just the same exact blob or bytes as are stored in the image file. There's no conversion done, there's a storage, an embedding of the file within a blob field of an SQLite database.

To say more, we'd need to know more, i.e. have a sample SQLite databse form which your software can find images and then inspect that with means of an SQLite driver. But I'd rather do this from SQLite itself, not VFP. It would just be one more level of indirection to work with VFP to inspect an SQLite databse file, if SQLite is all you need to find out structure and data. You can do this without VFP at all, because the SQLite software is free and documented and you can find out what's in an SQLIte database file, ie. which tabes, how they are defined (which fields they have) and look for blob fields in them, where images would be stored, most probably.

I doubt that SQLite has a specific field for images, even less so specifically for vector graphics formats. It will just store it and thus embed it. SQLite is the simplest database aside from even simpler XML or CSV based data, which would also only embed something binary as is and not convert it, so you're looking along a wrong thought of conversion and therefore don't find anything.

Images are not converted to database formats, databases are genrally storing data, also files, and that is not a conversion, just storage/embedding into a database file.

Chriss

RE: VPF convert file

(OP)
Yes, so currently the way the program shows the images on the screen is it chooses from over 40,000 images and depending on what command you give it it will pull up any number of those 40,000 at the same time or all of the 40,000 simultaneously so the SQL database correlates all 40,000 images and gives the command to pull up just the ones that you're asking for. Simultaneously the program merges all the images in which you ask it to pull up so it appears as one image each image can be individually taken apart and interacted with because it's actually a separate image that appears to be one large image. The file extension of the combined images when appearing on the screen is VPF it is an extremely high resolution image so I believe it is a vector but they're calling it "visible preset file" I can import files into the program and pull them up as long as the program can recognize the file I'm simply trying to convert an image I may make in Photoshop or on my computer and allow it to be pulled up by the program.

RE: VPF convert file

Still, the images are store in an SQLite database. So examine that with SQLite.

Quote (JB37)

so the SQL database correlates all 40,000 images and gives the command to pull up just the ones that you're asking for.
That will jsut mean that the database table of the images has 4000 records and together with the image stores some data you can use to filter them, meta information, whatever.

First step will be to analyze the SQLite database in how it is composed. And to insert a new image, once you found the table in which images are stored, will be using an SQL Insert statement in SQLite SQL dialect. You're still asking in the wrong forum, as that has nothing to do with VFP, only with SQL, so you're lucky we cover that topic here, generally, too.

Googleing "list of tables from an SQLite database", I get to this tutorial, for example: https://www.sqlitetutorial.net/sqlite-show-tables/

More to the point may be using a db management software like Navicat for SQLite - https://www.navicat.com/en/download/navicat-for-sq..., it'll have a lower hurdle, less steep learning curve to look inside the sqlite db with it, than just hainvg an SQLite command prompt.

Chriss

RE: VPF convert file

Some programmers store images and PDFs in Base64 strings. Basically, any binary data can be converted to a Base64 string. The drawback is a larger size. Many websites embed images like this in text fields. This is also possible in SQLite. Perhaps your images are stored in Base64 if they are stored in SQLite. It's easy to convert them back to files.

RE: VPF convert file

If I were you, I'd also look into what the application you use to find images offers for adding new images. Is that no feature? Is it only offering a way to search for images? If so, there is usually a reason for that, like licensing of the data, I don't know.

Anyway, your only way to extend data of an SQLite database is thorugh the database usge and its SQL, inserting an image into a database is not a file conversion process, it's simply an SQL statement to insert a new record or update an existing (i.e. replace an image), the sql engine, more precisely the storage engine of the database system will know how to a) expand the database file, if necessary, b) store the file inside a record structure (in a blob field, for example) and therefore the overall change to the file, this is not something you do yourself, you let the databse system do this by using SQL statements.

Chriss

RE: VPF convert file

(OP)
thank you

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close