Re: Doing an action for each color in an indexed color-palette

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks at first!
I'l test your script if there ist some time.

My handy way was:
1. create optimized palette
2. select by color
3. "flying layer" to new layer
4. extend layer to image extensions (important!!!)
5. rename the new layer to color or gis thema (eg. wather, street ...)
again for each color
6. save as xcf for keeping the layers
7. delete all uninteressting layers
8. create b&w palette 1-bit (may be before step 6 but layers must/should be named right)
9. save as tiff (may be with lzw-compression or not)
!!! binary tiff save had a bug in gimp 2.2 ..  but works fine with my 2.3.14 !!!
reload 6. again for each layer 

I'm not so good in programming and I do not know if my hady way could become a script an whitch would be better.


> -----Ursprüngliche Nachricht-----
> Von: saulgoode@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Gesendet: 27.06.07 17:20:44
> An: gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: Re:  Doing an action for each color in an indexed	color-palette


> 
> Quoting Roberto Uhlig <Roberto.Uhlig@xxxxxx>:
> 
> > Hello,
> > has/knows anyone a script/plugin (an idea) to go color by color   
> > through an indexed color-palette and doing an action for each color?
> > I'd like to create from a picture with an optimized color-palette   
> > with ca. 5-10 (may be 1-256) colors new layers or new pictures for   
> > each color in palette.
> > Layer(s) or pictures must have the same extensions like the original picture.
> > The new picture must be a black and white (1-bit) palette binary   
> > tiff for using in geo information systems as visible and invisible.
> 
> I have written a script  
> (http://flashingtwelve.brickfilms.com/GIMP/Scripts/Temp/save-as-map-masks.scm)  
> which attempts to address your problem. I do not know how to save  
> 1-bit TIFFs and so my script saves the files as RGB-mode  
> black-and-white PNGs (I know Indexed would be smaller, but I was lazy).
> 
>  From the comments in the script:
> 
> ;; Saves a PNG file for each color of an Indexed image where that
> ;; color is replaced by white and the rest of the image is black.
> ;; The PNG's filename is derived from the name of the bottom
> ;; layer of the original Indexed image. The RGB colors are
> ;; appended to this name, separated by hyphens.
> ;; An example of an output filename would be
> ;; "Background-10-242-79.png".
> ;;
> ;; The files (one for each indexed color) are saved in the same directory as
> ;; the original image (or to the GIMP invocation directory if a
> ;; new image).
> 
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
> 


_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066

_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux