Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input image cropped and overwritten #17

Open
mishraka opened this issue May 19, 2019 · 0 comments
Open

input image cropped and overwritten #17

mishraka opened this issue May 19, 2019 · 0 comments

Comments

@mishraka
Copy link

scipy.misc.toimage(np.squeeze(img), cmin=0.0, cmax=1.0).save(args.im_name)

Is that intentional? If not, how about saving the cropped image file in a temp folder to use later?

    # save the cropped image in temp folder to prevent overwriting
    img_name = os.path.basename(args.im_name)
    name, ext = os.path.splitext(img_name)
    args.im_name = os.path.join('/tmp/', name + '_cropped' + ext)
    scipy.misc.toimage(np.squeeze(img), cmin=0.0, cmax=1.0).save(args.im_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant