After thinking, I believe that your last method is too slow for my work...
Rhaa, is there nothing else method?
I just try another main map :
There are 3 different colors : 34, 68, 187 (without black color)
If we forget the failing when we have just 187 value and just that, the resizing create grayscale levels, we can apply this script :
Code: Select all
convert main.png +repage -write mpr:XX -filter Cubic -resize 2080x1430 +dither -remap mpr:XX spline.png;
We get a new map with also 3 colors, alright.
But if I want colorize this last map :
Code: Select all
convert spline.png g2.png -interpolate nearestneighbor -clut spline.png;
File gradient =>
Code: Select all
convert xc:#FFFFFF xc:#6EA1FF xc:#3770DF xc:#0040BF xc:#FC85F8 xc:#FD42F7 xc:#FF00F7 xc:#FA8484 +append g2.png
I obtain this map :
http://nauton.espace-meteo.com/m3.png
It's not normal to get the same blue (blue with red dot on this image), while on the main map there are two different gray colors for these area...
Edit:
If I use this resize:
Code: Select all
convert ./processing/map/main.png +repage -filter Cubic -resize 2080x1430 ./processing/map/spline.png;
After clut action, I get this map :
http://nauton.espace-meteo.com/Cubic.png
If I use this resize:
Code: Select all
convert ./processing/map/main.png +repage -filter Box -resize 2080x1430 ./processing/map/spline.png;
After clut action, I get this map :
http://nauton.espace-meteo.com/Box.png
I would like keep all values on the main map (but smooth area, not boxes...). With Spline interpolation the purple value disapear...
Problem without end
Edit 2:
I try again with this main map :
http://nauton.espace-meteo.com/main4.png
And this gradient :
http://nauton.espace-meteo.com/g3.png
On this main map I've these values : 0, 1, 2, 5
My gradient have 255 levels of color, so, I have to obtain for each value on my main map a color.
Code: Select all
convert main.png +repage -filter Spline -resize 2080x1430 Spline.png;
http://nauton.espace-meteo.com/Spline3.png
Code: Select all
convert main.png +repage -filter Box -resize 2080x1430 Box.png;
http://nauton.espace-meteo.com/Box3.png
Where is my purple value on the Spline map? I understand that create grayscale with spline interpolation, but lose values?