Solved

Resize Image without degradation

  • 5 November 2019
  • 6 replies
  • 76 views

Badge +2

Hello,

I want to resize an image. Per example 1000*1000 pixels to 200*200 pixels.

I tried RasterResampler, but I only get a degradation of the image, with the same size.

Is there a way to do that?

This is not my family : legacy from Google Images.

 

In M$Paint I would use this.

icon

Best answer by daveatsafe 5 November 2019, 22:15

View original

6 replies

Userlevel 2
Badge +17

Hi @philippeb,

Please set the Interpolation Type in the RasterResampler to Bicubic. This setting gives the best results for photos. The default Nearest Neighbor works best on elevation models.

Please note that the extents of the image in Data Inspector will not change, since the georeferencing was created when the image was read, and is not changed by the resampling. The pixel spacing will change to reflect the new pixel size, though. This georeferencing will be discarded if you write out to a non-geographic format, like PNG, JPG or TIFF.

Badge +2

Hi @philippeb,

Please set the Interpolation Type in the RasterResampler to Bicubic. This setting gives the best results for photos. The default Nearest Neighbor works best on elevation models.

Please note that the extents of the image in Data Inspector will not change, since the georeferencing was created when the image was read, and is not changed by the resampling. The pixel spacing will change to reflect the new pixel size, though. This georeferencing will be discarded if you write out to a non-geographic format, like PNG, JPG or TIFF.

Good, it works perfectly with JPEG. Do you think it would be possible to write the resized image into a 3D PDF ?

Userlevel 2
Badge +17

Good, it works perfectly with JPEG. Do you think it would be possible to write the resized image into a 3D PDF ?

Sure - just use a FaceReplacer transformer to convert the image to a Face textured with that same image, which is suitable for writing to 3D PDF.

Badge +2

resizedimageinto3dpdf.fmw

Hi @daveatsafe

So I'm now able to write an image into 3D PDF. I just learned another transformer. Thank you :)

But when I resize the image, it only degrades the quality. Nothing else is happening, as you can see.

This is my workbench, but I put it in attachment.

 

Userlevel 2
Badge +17

resizedimageinto3dpdf.fmw

Hi @daveatsafe

So I'm now able to write an image into 3D PDF. I just learned another transformer. Thank you :)

But when I resize the image, it only degrades the quality. Nothing else is happening, as you can see.

This is my workbench, but I put it in attachment.

 

Hi @philippeb,

Whenever an image is created or read into FME, it is is given a georeference to tie it the world. If this cannot be read from the source data, a default georeference is created, with 0,0 at the upper left corner of the image and a pixel size of 1.

Resampling the image will change the number of pixels in the image, but not the georeference location of the image. This is good if you are creating a lower resolution aerial image, since the image corners remain in the same location.

If you want to change the extents of the image as well as the resolution, you can use the Scaler transformer after the RasterResampler, with the X and Y scale factors set to 0.2, and Z Scale left at 1.

Badge +2

Hi @philippeb,

Whenever an image is created or read into FME, it is is given a georeference to tie it the world. If this cannot be read from the source data, a default georeference is created, with 0,0 at the upper left corner of the image and a pixel size of 1.

Resampling the image will change the number of pixels in the image, but not the georeference location of the image. This is good if you are creating a lower resolution aerial image, since the image corners remain in the same location.

If you want to change the extents of the image as well as the resolution, you can use the Scaler transformer after the RasterResampler, with the X and Y scale factors set to 0.2, and Z Scale left at 1.

A Scaler before FaceReplacer, exactly what I needed! Thanks a lot!!

Reply