title: Blender: How to resize selected part of uv image in python?
body: <p>I'm trying to select a part of my uv image. At blender, everything looks well, tipping "s" + "mouse resize".</p>
  
  <p><em>BUT</em> I need to do this at .py archive.</p>
  
  <p>Using the script bpy.ops.transform.resize(...), however, another thing happens! Object associated to image resize, not the uv image :(</p>
  
  <p>How I could do, at python, the resizing of uv image part?</p>
  
  <p>My script untill now:</p>
  
  <pre><code>def create_score():
  #adding empty object
  bpy.ops.object.empty_add()
  empty_obj = bpy.context.object
  empty_obj.name = "score"
  
  #adding score plane
  bpy.ops.mesh.primitive_plane_add(radius=1, location=(0.5,6.7,0))
  bpy.ops.transform.resize(value=(-8, -8, -8), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
  
  #adding score object1
  bpy.ops.mesh.primitive_plane_add(radius=0.5, location=(-6, 7.2, 0.1))
  obtext1 = bpy.context.object
  obtext1.name = "Score1"
  obtext1.select = True
  bpy.ops.object.editmode_toggle()
  for area in bpy.context.screen.areas:
      if area.type == 'VIEW_3D':
          area.spaces[0].viewport_shade = 'TEXTURED'
          area.type = 'IMAGE_EDITOR'
  #adding image I want resize
  bpy.ops.image.open(filepath="//../../textures/arialbd.tga", directory="/home/camila/Documents/cinemaxd/PlayerXD/textures/", files=[{"name":"arialbd.tga", "name":"arialbd.tga"}], relative_path=True)
  bpy.data.screens['UV Editing'].areas[1].spaces[0].image = bpy.data.images['arialbd.tga']
  bpy.ops.uv.unwrap()
  #selecting all image
  bpy.ops.uv.select_all(action='TOGGLE')
  </code></pre>
  
  <p>--
  This</p>
  
  <pre><code># store original area type
  originalArea = bpy.context.area.type
  # change current area to image editor
  bpy.context.area.type = 'IMAGE_EDITOR'
  
  #insert UV specific transforms here
  
  #return to previouswindow for good measure ( and cleanliness )
  bpy.context.area.type = originalArea
  </code></pre>
  
  <p>Do not helped too :/</p>