hugrubsan / Offline-Handwriting-Recognition-with-TensorFlow

29 stars 11 forks source link

Resizing Images with the Desired Width less than the Raw Width Throws an Error #5

Closed selcouthlyBlue closed 6 years ago

selcouthlyBlue commented 6 years ago

Apparently, when the desired width is less than the raw width, the scale_invert method throws an error, specifically on this line:

data = np.full((height, width - new_width + 1), 255)

That doesn't allow negative dimensions.

hugrubsan commented 6 years ago

In principle, it is only designed to increase the image size and fill in with black spaces until the target width is reached.

You can always modify it ;)