tproduit / pic2map

QGIS plugin for camera orientation and interaction between a picture and the map (monoplotting).
22 stars 5 forks source link

ortho.py: misc.imresize deprecation warning possible replacement suggestion #16

Closed apiszcz closed 4 years ago

apiszcz commented 4 years ago

skimage is scipy recommendation, however PIL is already available as a package.

             `imresize` is deprecated!
             `imresize` is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
             Use ``skimage.transform.resize`` instead.

Possible: (ortho.py)

FROM: ~426,440, 445
       self.image = misc.imresize(self.image, (newHeight, newWidth))
        imX = misc.imresize(imX,(newHeight, newWidth), interp = 'bicubic', mode = 'F')
        imY = misc.imresize(imY,(newHeight, newWidth), interp = 'bicubic', mode = 'F')
TO
        self.image = Image.fromarray(self.image).resize((newHeight, newWidth),resample=Image.BICUBIC)
        imX = Image.fromarray(imX).resize((newHeight, newWidth), resample=Image.BICUBIC)
        imY = Image.fromarray(imY).resize((newHeight, newWidth), resample=Image.BICUBIC)