timwaters / mapwarper

free open source public map georeferencer, georectifier and warper
http://mapwarper.net
MIT License
196 stars 80 forks source link

How to get cropping mask applied? #109

Closed EladHorn closed 7 years ago

EladHorn commented 7 years ago

For some reason I can't apply cropping mask to this big aerial photography of Boston area.

It was uploaded as a 300MB JPG, and rectified using 143 points.

http://mapwarper.net/maps/14526#Crop_tab

timwaters commented 7 years ago

This image is grayscale, it could be due to a colourspace or something like that - I will investigate some more.

timwaters commented 7 years ago
Size is 34981, 16172
Coordinate System is `'
Metadata:
  EXIF_BitsPerSample=8
  EXIF_ColorSpace=65535
  EXIF_Compression=1
  EXIF_DateTime=2016:06:18 01:19:47
  EXIF_Orientation=1
  EXIF_PhotometricInterpretation=1
  EXIF_PixelXDimension=34981
  EXIF_PixelYDimension=16172
  EXIF_PlanarConfiguration=1
  EXIF_ResolutionUnit=2
  EXIF_SamplesPerPixel=1
  EXIF_Software=Adobe Photoshop CC (Macintosh)
  EXIF_XResolution=(72)
  EXIF_YResolution=(72)
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,16172.0)
Upper Right (34981.0,    0.0)
Lower Right (34981.0,16172.0)
Center      (17490.5, 8086.0)
Band 1 Block=34981x1 Type=Byte, ColorInterp=Gray
  Overviews: 17491x8086, 8746x4043, 4373x2022, 2187x1011, 1094x506, 547x253
timwaters commented 7 years ago

I applied mogrify -type truecolor -compress lzw 3BottomRows_1_afterMerge.jpg.tif to the file

and run again. It worked okay. It should be fine now for any future cropping

This is a known issue and is fixed in Master. In the meantime, you can make sure that the files that are uploaded are in trucolor / with 3 bands.

So in Gimp, for example, save it as RGB, not grayscale