comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Is it possible to rotate a flipped image with cgImage?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is it possible to rotate a flipped image with cgImage? [message #88844 is a reply to message #88842] Wed, 25 June 2014 05:45 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> I get an error like this ...
>
> % POLY_2D: Expression must be an array in this context: I.

The documentation says, "The image array to be rotated. This array can be of any type, but must have two dimensions."

You can try separating the color channels and rotating them individually (below). Or you could try to convert the rgb values to color table indices.

IDL> im = cgdemodata(16)
IDL> help, im
IM BYTE = Array[3, 227, 149]
IDL> r = reform(flipIm[0,*,*])
IDL> g = reform(flipIm[1,*,*])
IDL> b = reform(flipIm[2,*,*])
IDL> rrot = rot(r, 60, 0.8, /INTERP)
IDL> brot = rot(b, 60, 0.8, /INTERP)
IDL> grot = rot(g, 60, 0.8, /INTERP)
IDL> rotflipIm = transpose([[[rrot]], [[grot]], [[brot]]], [2, 0, 1])
IDL> help, rotflipim
ROTFLIPIM BYTE = Array[3, 227, 149]
IDL> cgimage, rotflipim
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Output matrix from Wavelet Toolkit 3D Wavelet Power Spectrum
Next Topic: A case for lookarounds in StRegEx()

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:52:55 PDT 2025

Total time taken to generate the page: 0.71952 seconds