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 #88847 is a reply to message #88844] Wed, 25 June 2014 06:14 Go to previous messageGo to previous message
atmospheric physics is currently offline  atmospheric physics
Messages: 121
Registered: June 2010
Senior Member
Hello Matthew,

Thanks for the example. If I see the images of im and (flipIm or rotflipIm), then there the rose color is changed to blue. I don't want to change the colors from my original image. I wanted to have my original image with all colors as they are and then only apply this flipping and rotation.

Without using interpolation, can't I retain my image as it is and enclose in the available space? I mean if the original image is a square type, the final rotflipIm can be rhombus type. Is this not possible? In order to fill the missing pixels of the im images, can't we use missing color as white?

Look's the image rotation is distorting the original image completely.

Thanks in advance,
Madhavan



On Wednesday, June 25, 2014 2:45:02 PM UTC+2, Matthew Argall wrote:
>> 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: Wed Oct 08 19:31:17 PDT 2025

Total time taken to generate the page: 0.00425 seconds