Results 1 to 6 of 6

Thread: transparencies and resizing

  1. #1
    sunnyl
    Guest

    transparencies and resizing

    I've drawn some sprites at 32x32 and they're great on the screen with transparencies (not with masks, but with ColorKeys in DirectDraw).

    But now I've found that the sprite at 32x32 is little out of proportion for the other sizes of things in the screen. So I thought I'd simply change the destination RECT in the blit function from 32x32 to 24x24.

    It still blits, but parts of the transparent colour (white) shows up around the edge of the sprite when it is blitted. What can I do to fix this?

    I'd prefer not redrawing the sprite actually at 32x32, because there are simply too many to redraw, and I've tried it several times but I always ended up not having enough space to work with.

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Well this may or may not be a totally unrelated matter completely, but I've had similar problems. Sometimes loading a BMP and colourkeying it causes it to become blurry, therefore making colourkeying impossible. I had that happen to me many times...

    Anyways, what colour depth is the sprite, and what colour depth is the screen?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3
    sunnyl
    Guest
    The sprite was drawn in Win Paint at 24bit and DirectX runs at fullscreen at 800x600@16 bit

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Well sometimes colourkeying works in 16bit mode sometimes it doesn't. Look at http://www.vbexplorer.com/directx4vb/ and check out 16 bit colour keying. See if that doesn't help you.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    sunnyl
    Guest
    Well I think I've figured out why...

    The original image looks fine at 32x32

    When resized to 24x24 the colours become spread out and shades of colours go on the edge of the sprite

    Since I've only specified white as the colour key, the edges with the small tints of colours won't be transparent.

    I'm going through all 86 images to remove the edges!

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    You could set the low part of the colour key to be a bit lower, (eg. RGB 240,240,240) but mind you that you'll have to put it into that DXColour converter for 16-bit modes or else it wont work.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

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



Click Here to Expand Forum to Full Width