# Display Zoom information

In several graphics app such as Photoshop (or even other apps like Word), the view zoom is indicated at the bottom of the window:

Photoshop

Word for Mac

However, in Blender's image viewer, I haven't been able to find such a thing.

The only thing I could find is the View menu, which doesn't tell you which setting you are on but lets you click on one of them:

If I select "Zoom 1:1" then go return to the View menu, "Zoom 1:1" will not have a checkmark next to it

Is there a way to display the percentage of the zoom currently applied to the image editor?

Blender doesn't offer a way to show the zoom level but we can use python to display it if we want.

The simplest way is to add a panel -

import bpy
import math

class Image_PT_zoom(bpy.types.Panel):
bl_idname = "Image_PT_zoom"
bl_label = "Image Zoom"
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'

def draw(self, context):
zoom = context.space_data.zoom[0]*100
zoom_h = context.space_data.zoom[1]*100
if math.isclose(zoom,zoom_h,rel_tol=0.001):
self.layout.label(text="{:.1f}%".format(zoom))
else:
self.layout.label(text="Width:  {:.1f}%".format(zoom))
self.layout.label(text="Height: {:.1f}%".format(zoom_h))

def register():
bpy.utils.register_class(Image_PT_zoom)

def unregister():
bpy.utils.unregister_class(Image_PT_zoom)

register()


You can find this as an addon here.

• I tried pasting your code in the Python Console but got error messages, so I installed from file, but I cannot see where the zoom info is displayed? imgur.com/a/BNwJ7 – MicroMachine Sep 19 '17 at 20:41
• In the properties sidebar N - the script above should have had a register() call at the end, add that. example – sambler Sep 20 '17 at 9:58