Select to view content in your preferred language

Converting jpg images to BLOB

4056
8
06-23-2023 08:42 AM
JayanthiRajagopalan
Emerging Contributor

I have a field in a feature class that contains the names of the .jpg files. The actual images are stored in the hard drive. I need to convert these images and save them to another field in the same feature class as a BLOB object. Is there a way to do this in ArcGIS PRO?

0 Kudos
8 Replies
AlfredBaldenweck
MVP Regular Contributor

Could you just add them as attachments in an attachment table? They'll be stored as BLOB in the attachment table.

Add Attachments (Data Management)—ArcGIS Pro | Documentation

Generate Attachment Match Table (Data Management)—ArcGIS Pro | Documentation

0 Kudos
JayanthiRajagopalan
Emerging Contributor

That option may not be acceptable, as the customer wants the images to be written in the BLOB format in one of the fields of the output feature class. 

0 Kudos
RhettZufelt
MVP Notable Contributor

It appears you can use arcpy updatecursor to do this.

However, I don't see any ESRI product/tool that can access it, so, not sure the benefit.

R_

0 Kudos
JayanthiRajagopalan
Emerging Contributor

Ok, let me try this. Thanks

 

0 Kudos
RenatoSalvaleon3
Esri Contributor

If you prefer no code, ArcGIS Data Interoperability extension for Pro can do this but you need to install the product and license it.

Here's a sample article with a solution from Safe software on how to do it using Data Interoperability/FME Form.
https://community.safe.com/s/article/how-to-read-the-contents-of-a-file-into-a-database

Here's a couple of use cases whose solutions can be reauthored to solve your problem and can do exactly what you want to do, di-survey123-tools-no-code-required.

 

0 Kudos
AlfredBaldenweck
MVP Regular Contributor

I suppose maybe you could just do a join between the origin and attachment tables, then export them together?

0 Kudos
JayanthiRajagopalan
Emerging Contributor

I have tried to do this. However, the Data field (where the BLOB files are stored) is not one of the fields that can be transferred to the input table. It does not appear in the Transfer field option. Maybe there is another way, which I am not aware of yet.

0 Kudos
AlfredBaldenweck
MVP Regular Contributor
0 Kudos