Results 1 to 3 of 3

Thread: Small images are not rotated correctly.

  1. #1

    Small images are not rotated correctly.

    Hello,

    Did You noticed that when using Image.DrawRotate, for example

    [pascal]
    Image.DrawRotate(Form1.DXDraw1.Surface, Round(X)+(Image.Width div 2),Round(Y)+ (Image.Height div 2), Image.Width , Image.Height , 0, 0.5, 0.5, Round(Angle));[/pascal]

    The rotated image sometimes has to much pixels, sometimes the pixels are missing :?
    Any way to fix this issue?

    Regards

  2. #2

    Small images are not rotated correctly.

    First off, double check your images are power of 2 in size, this is a important thing. Been around longer than I remember.

    Secondly, depending on your screen size in relation to your image size, and any applicable zoom factors, this may be natural.

  3. #3

    Small images are not rotated correctly.

    Robert, I don't think images need to be power of two, it's DelphiX

    The problem with pixels is because the rotation creates alias. Two things you can do:

    1) Apply antialiasing. This will most likely solve the problem, although your resulting image will be slightly blurred.
    2) Resize your image to 2x size and then draw it rotated in smaller size. This will reduce the problem, but not eliminate it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •