Question

Create a jp2 with a tif (with an inferior size)

  • 3 December 2014
  • 2 replies
  • 3 views

Hello,

 

I would like to do a jp2000 file with a tif.

 

My conditions :

 

1- the tif is black on white so i want my jp2 black on white

 

2- the siz of the jp2 must be less than the tif

 

 

Using rasterpalletremover my jp2 is 500Ko big but i need to specify nodata=0 in Qgis to see it in black on white instead of white on black..

 

See joined files (fil and jp2 500 Ko).

 

I test many ways like rasterpaletteresolver and the viewing is ok but the files is three times bigger!!!(2.9Mo).

 

 

If anyone can help me

 

 

thanks,

 

 

dowload my file here :

 

https://drive.google.com/file/d/0B90n7rx5ph0ZMXFUUUtvbVplUXM/view?usp=sharing

 

 

PS : si vous parlez français dites le moi!!

2 replies

Userlevel 2
Badge +17
Hi,

 

 

The original tiff is a 2-values image (0=white, 1=black).

 

If a 2-values image (0=black, 1=white) satisfies your requirement, you can reverse all the cell values with the RasterExpressionEvaluator after removing the palette.

 

Expression: @if(A[0]==0,1,0)

 

Then, write the raster into jp2 (0% compression). 

 

 

Takashi
Userlevel 2
Badge +17
"2-values image" was not general terminology. I intended to mean "Binary image". (http://en.wikipedia.org/wiki/Binary_image)

Reply