Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

java image

Thread view: 
rathees_h@yahoo.com - 07 Feb 2006 10:00 GMT
How can i rotate a java image without using Graphics2D &
AffineTransform ? .Actually i want to implement this in j2me.
Roedy Green - 07 Feb 2006 12:40 GMT
>How can i rotate a java image without using Graphics2D &
>AffineTransform ? .Actually i want to implement this in j2me

if it is a small enough image, you can grab it pixel by pixel, and
plop it into a new Image array pixel by pixel where it belongs.  
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Oliver Wong - 07 Feb 2006 16:56 GMT
>>How can i rotate a java image without using Graphics2D &
>>AffineTransform ? .Actually i want to implement this in j2me
>
> if it is a small enough image, you can grab it pixel by pixel, and
> plop it into a new Image array pixel by pixel where it belongs.

   The other method is to start from the target image, and then "work
backwards" and determine which pixel to "plop" from in the source image. You
might do "nearest-neighbour" approximation, where the same pixel from the
source might be used for two or more pixels in the target, or some sort of
weighed-average of the neighbouring pixels in the source image depending on
what your sin/cosine functions return as the source coordinates.

   Depends on how much processing power you have available to you, and how
patient your users are.

   - Oliver
rathees_h@yahoo.com - 08 Feb 2006 08:51 GMT
can u give me any code samples or any site adreess
Oliver Wong - 08 Feb 2006 15:00 GMT
> can u give me any code samples or any site adreess

   I googled for "Image rotation" and got

http://www.codeguru.com/Cpp/G-M/bitmap/specialeffects/article.php/c1747/

http://www.lawrencegoetz.com/programs/image3d/

And others.

   - Oliver
Roedy Green - 08 Feb 2006 16:54 GMT
>How can i rotate a java image without using Graphics2D &
>AffineTransform ? .Actually i want to implement this in j2me.

If all you want is a rotating icon, prerotate icon and keep around png
files of the icon at different degrees of rotation.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.