Skip to content

Instantly share code, notes, and snippets.

@sunnyone
Created September 11, 2017 09:11
Show Gist options
  • Save sunnyone/0b6d22ff2228c710ee5b8f05ca4172ae to your computer and use it in GitHub Desktop.
Save sunnyone/0b6d22ff2228c710ee5b8f05ca4172ae to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gimpfu import *
def plugin_main(image, layer):
image.disable_undo()
image.resize(image.width / 2, image.height / 2, 0, 0)
layer.scale(image.width, image.height, 0, 0)
image.enable_undo()
register(
"python_fu_resize_half",
"blurb: Resize half",
"help: Resize the picture to half size",
"author",
"copyright",
"2017/9/11",
"<Image>/Image/Resize to half size",
"*",
[],
[],
plugin_main)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment