Hi everyone!
I have begun to work with your services recently and one point makes me baffled because I can’t understand why it happens. The color on the leaflet map is different from the color of the original image.
I suppose it is problem with Leaflet but maybe somebody knows the solution
It’s an image that I receive from sentinel (A)
And when I try to visualize it on leaflet map using this code.
r <- raster::raster("~/response_JPEG.png")
val <- c(19.06162, 19.34916, -34.45179, -34.31693)
crs(r) <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
im <- raster::setExtent(r,val)
leaflet() %>% addTiles() %>% addRasterImage(im)
It gives me this map that has a color different from the color on the original image - (B)
I will appreciate any help from your side!