Need help, rotating then printing images - whilst still retaining quality

Jason (Polydiam) jason at polydiam.com
Mon Jan 16 11:23:59 EST 2006


I've made a stack which allows users to import an image into it then move
the image around until they have it where they want it.
The user is then able to press print and print out whatever is in that
particular stack onto a page onto coordinates I have supplied.

When bringing in a large image, the program automatically resizes it to the
size of the stack which is 304x380px, and when printing the image, it prints
out at a high res (as long as the image is high res).

I'm using the following code to rotate the image, so I don't lose image
quality:
-------------------------------------------------------------------------
put the rect of image "MyImage" on stack "MyStack" into rotateRect1
 put the rect of image "MyImage" on stack "MyStack" into rotateRect2

   put (item 1 of rotateRect1) into item 2 of rotateRect2 
    put (item 2 of rotateRect1) into item 1 of rotateRect2 
   put (item 3 of rotateRect1) into item 4 of rotateRect2 
    put (item 4 of rotateRect1) into item 3 of rotateRect2

set the angle of image "MyImage" on stack "MyStack" to the angle of image
"MyImage" on stack "MyStack" -90

   set the rect of image "MyImage" on stack "MyStack" to rotateRect2
--------------------------------------------------------------------------
When I rotate an image using the code above, it look ok on the screen, but
oddly, when I try to print the stack using the code below - when an image
has been rotated (and only when an image has been rotated), most of the
image disappears and very oddly prints out a very small section of the image
only. 
---------------------------------------------
put "18,34,386,538" into imagePrintSize

  open printing
  
    print stack "MyStack" into imagePrintSize
    
  close printing -- send group of cards to printer
------------------------------------------------

I can't understand why, Is this a fault with revolution? I've tried using
the rotate command, which seems to work, but that loses a lot of quality
because the image is resized to the size of the stack. Is there a way
rotating an image with the 'angle' command then making a new image from that
and then printing? Or a better work around that anyone can think of?


I really appreciate the help. Thank you
Jason




More information about the use-livecode mailing list