Skip to main content
Question

using clipper to cut image ,includes black parts around the specific target.Cancel black parts,How?

  • July 14, 2021
  • 4 replies
  • 26 views

spiderman
Contributor
Forum|alt.badge.img+7

i have cut specific image with clipper but when i use clipper inside ,i found it includes my target and also black parts around the image that i need to have .how could i cancel black parts ,and keep only my target image ?

4 replies

david_r
Celebrity
  • July 14, 2021

Have you looked at the RasterBandNodataSetter? It will allow you to define the "black parts" as NODATA, rendering them transparent in most clients.


spiderman
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • July 14, 2021

Have you looked at the RasterBandNodataSetter? It will allow you to define the "black parts" as NODATA, rendering them transparent in most clients.

thanks ,it looks what i need and i did nodata value 0 and output in inspector looks great but when i write the output to pdf by pdf writer .it gives me error and unable to write it .

but without using nodata value ,pdf was able to write the image but with black parts .

another hint :i found also some parts of text deleted also after using nodata value . is there another way to remove blackparts only .

could u help me ,thanks again


david_r
Celebrity
  • July 14, 2021

thanks ,it looks what i need and i did nodata value 0 and output in inspector looks great but when i write the output to pdf by pdf writer .it gives me error and unable to write it .

but without using nodata value ,pdf was able to write the image but with black parts .

another hint :i found also some parts of text deleted also after using nodata value . is there another way to remove blackparts only .

could u help me ,thanks again

Can you share the complete error message please.


spiderman
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • July 14, 2021

thanks ,it looks what i need and i did nodata value 0 and output in inspector looks great but when i write the output to pdf by pdf writer .it gives me error and unable to write it .

but without using nodata value ,pdf was able to write the image but with black parts .

another hint :i found also some parts of text deleted also after using nodata value . is there another way to remove blackparts only .

could u help me ,thanks again

hello ,now i am confused . after using RasterBandNodataSetter .it shows me in inspector without nodata ,without black parts but when i write it to pdf by pdf writer.i found,i get now outpu (no error ) but with black parts .what is wrong here?

could you provide me with an example for workspace ,if you do not mind