Question

resize images stored as blob

  • 15 October 2015
  • 2 replies
  • 14 views

Badge
I am trying to resize several thousand images that are stored as sde attachments.  I am wondering if it is possible to do this without writing the images to disk.  I can extract the full sized images to files using the attributefilewriter. Once I have the images extracted it is straight forward to resize them using the rasterresampler. Since I have so many images I would like to avoid writing them to disk before resizing but the output port of the attributefilewriter does not contain raster data so when I conect it to resampler I get an error.

2 replies

Userlevel 2
Badge +17
Hi,

 

 

I don't think a blob can be resized directly, but it's possible to create a raster data on the memory from the blob, resample it, and create a new blob of the resulting raster, if the blob format is supported by FME.

 

i.e.

 

Create a raster data from the source blog with the RasterReplacer.

 

Resize the raster with the RasterResampler

 

Extract a blob from the resulting raster with the RasterExtractor.

 

 

Takashi
Badge

As a follow up to this. Is it possible to get the rotation of an image attachment to rotate the image before reampling and saving. I’ve tried a few things but can’t get any to work.

Reply