Re: [gdal-dev] RGB to PALETTE conversion

2018-02-05 Thread Paulo Pires
Thanks Chris Smemoe and jratike80,

I found a solution, thanks to you both. I create my palette image in
photoshop, then with gdal, I create my VRT fron that image and then, all my
next images with the same colors with rgb2pct...

Like a charm.

If you know best approach, please let-me know.

Thanks, once again!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] RGB to PALETTE conversion

2018-02-05 Thread jratike80
Paulo Pires wrote
> theres any help, please?
> 
> RGB to Palette...
> CMYK to Palette...
> 
> Thanks

Have you tried http://www.gdal.org/rgb2pct.html?

-Jukka Rahkonen-



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] RGB to PALETTE conversion

2018-02-05 Thread Chris Smemoe
Paulo,

Are you trying to convert a file with multiple bands (RGB or RGBA) to a file
with a single band and a color palette?  One possible solution showing how
to do this using GDAL is shown on Stack Exchange at the following location:

https://gis.stackexchange.com/questions/246045/export-geotiff-with-color-tab
le-from-web-service-using-gdal-translate/259414#259414

Somebody might have something better.

I imagine you could use a similar solution to handle CMYK images.

Chris

-Original Message-
From: gdal-dev [mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Paulo
Pires
Sent: Sunday, February 04, 2018 4:30 AM
To: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] RGB to PALETTE conversion

theres any help, please?

RGB to Palette...
CMYK to Palette...

Thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] RGB to PALETTE conversion

2018-02-04 Thread Paulo Pires
theres any help, please?

RGB to Palette...
CMYK to Palette...

Thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] RGB to PALETTE conversion

2018-01-23 Thread Paulo Pires
Hello,

I'm trying to convert RGB image to PALETTE image with PIL:

/img = Image.open(tiffile)
img = img1convert("P", palette=Image.ADAPTIVE, colors=256)
img.save(newtiffile+"_index.tif") 
img.close()/

...but, for example, the white color is 245, not 255 :(

And from CMYK to PALETTE? Is it possible? gdal option, please...

Thanks




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev