Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ Comments about the function WindowTransformImage

Comments about the function WindowTransformImage

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #15 on Fri 27 Aug 2010 05:41 AM (UTC)
Message
Nick Gammon said:

Twisol said:

The issue was that your implementation is difficult, so I found another. Does the other implementation make it any easier? It seems like it only needs two blits.


I count four in the code. Two in the setup (to set up the mask) and two in the painting area.

My four are all done at once, because I don't know in advance which bitmap you are doing to do it with.


Huh, sorry about the noise then. (It does seem to use SRCCOPY, SRCAND, and SRCPAINT, where you use SRCCOPY, SRCAND, and SRCINVERT, but I guess there's no difference here.)

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Fiendish   USA  (2,534 posts)  Bio   Global Moderator
Date Reply #16 on Fri 27 Aug 2010 06:20 PM (UTC)

Amended on Fri 27 Aug 2010 06:28 PM (UTC) by Fiendish

Message
1) The name should be WindowTransformImage, not WindowTranslateImage, since translation is just one class of transformation.
2) The transformation results would benefit from bilinear or bicubic interpolation. The shear and rotate examples are super jaggy.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #17 on Fri 27 Aug 2010 10:27 PM (UTC)
Message
Fiendish said:

1) The name should be WindowTransformImage, not WindowTranslateImage, since translation is just one class of transformation.


OK good idea. Did that and revised various documentation and forum posts.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #18 on Fri 27 Aug 2010 10:38 PM (UTC)
Message
Fiendish said:

2) The transformation results would benefit from bilinear or bicubic interpolation. The shear and rotate examples are super jaggy.


This isn't Photoshop, as I was trying to explain to Twisol. Interpolation is not supported by the underlying Windows API.

The client is not intended to be rendering and rotating images on-the-fly like a shoot-em-up game.

I can understand it would be useful to have rotated text (say) for tabbed windows. This can be accomplished now by pre-rendering the tabs (in a scratch miniwindow), converting to an image, and then rotating them. The rotations of 90, 180 and 270 degrees look fine.

You also have the option of pre-rotating an image in Photoshop or other program of your choice, and then rendering the pre-rotated image in the miniwindow.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


46,123 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.