v0.68
now really ok with linux, (0.6 was not able to drag/resize in linux)
zip : https://github.com/littleneo/image_tools/zipball/master
fork: https://github.com/littleneo/image_tools
.integration of nconvert (xnview features) and all of its features :
crop, resize, levels, rotate per degrees, copy from clipboard… billions of options. some of them are integrated in the ui but you can directly write any option in a textfield (XnNerds)
.selection box overlay for cropping : drag/resize the box to define the crop. (see video below)
. history of modification. create a first temp image from the original then from the temp a second temp, then from the second temp… etc.
. it only uses one image slot for all the temporary revision of an original so you got the my_original_image slot and my_original_image slot.tmp (in which you can cycle through the different temp revision)
. original images always stay safe and linked to their users
. directly paste an image from the clipboard. quick step from gimp, ps, alt-imp etc. should work in the other way too (soon).
you’ll need nconvert from here or a full xnview install :
http://www.xnview.com
bpy access
returns the active image, if an (or several) UV editor panel exists somewhere in you blender ui with an image displayed within. returns False if there’s several UVeditor are opened with different images.
import image_tools
img = image_tools.active()
nconvert features are available from the command line/scripts :
the following create a copy of img :
img = bpy.data.images['tranquille.jpg']
img.nconvert('-rotate 41 -rotate_flag smooth -autocontrast -noise reduce ')
mirror has been removed for now.
if you want to test, it’s not finished but this is safe and handy to my point of view. thanks for comment and c&c I’m not an image/texture guru so maybe you’ll have interesting ideas to share about what kind of feature would be helpful (but mm goal is not to rewrite ps of course)
img = image_tools.active() # returns the active image
methods so far : disabled for now in 0.4
img.rotate() # 180°
img.rotate(-90) # to the left, works with rectangular images
img.mirror('Y') # as above but vertically
img.flip('X')
bpy.ops.image.rotate() # or mirror, flip etc operate a method on the 'active' image (visible in the UV editor)
DL (v0.3) :
updated 4 october : nconvert and history
updated 29 september 2011 thanks to Dustractor in this thread about bpy hooks.
functions are now available as image object methods :
improved a function that returns the displayed image in the uv editor, whatever the uv panel is displayed or not in the current screen. it acts a bit like woulld a bpy.context.active_image function do.