Skip to main content
Question

Hi, I want to export a picture to JPG or BMP out of a Oracle-non spatial table. This picture is stored like: FFD8FFE000104A46494600010101006000600000FFDB00430006040506050406060506070706080A100A0A09090A140E0F0C10171418181714.....

  • October 1, 2020
  • 4 replies
  • 143 views

perry
Forum|alt.badge.img+2

Hi,

I want to export multiple pictures to JPG or BMP out of a Oracle-non spatial table.

These pictures are stored like: FFD8FFE000104A46494600010101006000600000FFDB00430006040506050406060506070706080A100A0A09090A140E0F0C10171418181714.....

In a different table there is an unique explination of this picture (ie street and number)

Is it possible with FME to convert and to export this table to a directory on my network with pictures with format JPG or BMP? I need this pictures to provide an external office so they can use these pictures as offfered.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • 8392 replies
  • October 1, 2020

You can try reading the table normally (using an Oracle reader or a FeatureReader transformer), then write the binary picture data using the AttributeFileWriter. Don't forget to set the Target File Encoding to fme-binary.


perry
Forum|alt.badge.img+2
  • Author
  • 49 replies
  • October 1, 2020

Thanks David_R,

Yes its works great but how can I realize that each record (=picture) will not overwrite the earlier downloaded picture. I can use APPEND TO file but I prefer to use the IMAGENUMBER as identifier for the downloaded JPG and extract seperate files with the name <IMAGENUMBER>.JPG.

Is this problem to solve with a parameter or loops with counters? or is there a better way?


david_r
Celebrity
  • 8392 replies
  • October 2, 2020

Thanks David_R,

Yes its works great but how can I realize that each record (=picture) will not overwrite the earlier downloaded picture. I can use APPEND TO file but I prefer to use the IMAGENUMBER as identifier for the downloaded JPG and extract seperate files with the name <IMAGENUMBER>.JPG.

Is this problem to solve with a parameter or loops with counters? or is there a better way?

Indeed, you'll have to specify unique filenames in the AttributeFileWriter to avoid overwriting existing files. I do not think it is possible to append several images in one file, at least I'd be surprised if you could get something meaningful out of that file later on.

One possible solution for generating unique filenames could be to use something like the Counter or perhaps even the UUIDGenerator.


perry
Forum|alt.badge.img+2
  • Author
  • 49 replies
  • October 5, 2020

Hi David,

It works!

I have many thanks for your support.

I made a fme etl and you will find some printscreens.

Many thanks for your support.

Perry

 

IMAGE2IMAGE1IMAGE3