blocky images

Discussion in 'Scripting & Programming' started by zxspectrum, Jan 26, 2007.

  1. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Hi there people.

    this is a query for you people who use VB.net 2003. For our uni assignment we made a jumping game using santa and the aim was to deliver as many presents as ppossible. The obstacle was in the form of a sleeping dog, who would bit santa if he touched him the more presents he delivered , the higher the stack. If people want i can post the version we submitted

    Anyway,one thing we couldnt do is get rid of the blocky image no matter what we tried, and it really looked silly. Ive heard some one mention PNG images instead of bitmaps and jpeg, which we tried to render in dreamweaver and paint but ton on avail.

    I was wondering if anynoe could help me out on this. Do i have to have the images already made, ie without the blockiness in the first place???

    Eddie:oops:
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  2. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    Does the image get resized when its put into the app? If it is ‘stretched’ slightly then it will distort the original image. Just a suggestion though, the last code I wrote was in VB6! :biggrin
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  3. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    No the images stays the same , and when i try to use the magic wand feature in dreamweaver it gives the impression that it has removed what i wanted it to get rid of but then the blocky bit is still there

    Dont know if this is an idea but here goes. I remember when sonic the hedgehog was brought on to the mega drive, early 90s. The first one made sonic go from being upright to ready to spin in one frame, the sonic T hedgehos 2 however used and extra frame etc so it gave it more of an effect i spose.

    Anyway i spose im trying to enquire if i just got the images without the blocky background etc surely i should be able to use them as they are??

    Ps to any mods, sorry for posting in the wrong place feel free to move this post

    Eddie
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  4. Bluerinse
    Honorary Member

    Bluerinse Exabyte Poster

    8,878
    181
    256
    Done!
     
    Certifications: C&G Electronics - MCSA (W2K) MCSE (W2K)
  5. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    Can you post the code you are using to link to the graphic?
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  6. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Not really as the images are just placed on the form, there is no code behind them? There obviously is code fort them to work but it will be a lot etc. would you like me to post you the program so you can see for yourself??
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  7. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    You have code in the form though, like if you created a label or a textbox it would have code in the form 8)
     
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  8. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Blocky images always means that the number of pixels is far fewer then the screen resolution.

    I don't see any details of either here - so can't suggest a solution!

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  9. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    The image was just added using the properties window so there is no sizes on the form, and all the code that is available is making the image go left righ and jump etc ?? So i dont know hoe else to get you the info you need

    Eddie
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  10. Mathematix

    Mathematix Megabyte Poster

    969
    35
    74
    Possible Explanation 1

    It sounds like you are having an aliasing problem. In your code you are taking a larger image with many pixels and representing it in the game with fewer pixels. Changing file formats is unlikely to fix this. If you do not put images in your game that do not scale correctly, you could have this problem.

    Possible Explanation 2

    The image dimension in pixels is not a power of two, eg: 64x64, 128x128, 256x256, etc. Not observing this format results in undefined results.

    Possible Explanation 3

    Is the colour depth in your code 16 or 32-bit? Make sure that this matches the code used to load your image into the buffer as this could have the illusion of image bleed and blockiness.

    This is all that comes to mind. without seeing the code and the image it's impossible to pinpoint the problem.
     
    Certifications: BSc(Hons) Comp Sci, BCS Award of Merit
    WIP: Not doing certs. Computer geek.
  11. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Hi there Mat, i hope this screenshot will help you

    Eddie:)
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  12. JonnyMX

    JonnyMX Petabyte Poster

    5,257
    220
    236
    I just want to clarify what you mean by 'blocky'.

    Do you mean that the outlines of the actual pictures appear jagged and pixelly (especially on curves)?

    Or (from looking at the screenshot) that the images are mounted on white blocks which may sometimes overlap or get in the way?
     
    Certifications: MCT, MCTS, i-Net+, CIW CI, Prince2, MSP, MCSD
  13. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Or is it the colouring of the presents (brown boxes)?

    If it is this than that is down to too few colours to get a colour gradient.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  14. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    NO the problem is that the screen shot you have there id fromn the disign view. But when you run it obviously the dots go, but you know the rectangle behind sants (look at the chimney) that stays there whaen the program is run . It looks ok on the white background at first but when he comes near the dog or the tree etc , you sewe the blockiness

    Eddie
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  15. hbroomhall

    hbroomhall Petabyte Poster Gold Member

    6,624
    117
    224
    Ah! In other words the rectangle overlays the background graphics!

    You need to make the Santa background 'transparent'. That will solve that.

    Harry.
     
    Certifications: ECDL A+ Network+ i-Net+
    WIP: Server+
  16. JonnyMX

    JonnyMX Petabyte Poster

    5,257
    220
    236
    Redo your images as gifs and set the background to transparent.

    Word of warning, you may wish to change the background colour first - say to green, then make that the transparent colour.

    Otherwise all the other white parts (such as santa's beard) will also become transparent.

    I'd trim the camvas on your images or crop them, to reduce the unnecessary borders.

    HTH.
     
    Certifications: MCT, MCTS, i-Net+, CIW CI, Prince2, MSP, MCSD
  17. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Is there no way i can put an outline around the image to get rid of the 'white rectangle' as i will need the beard bit. If you have used dreamweaver before there is a magic wand feature that seems to do this ? On the tranparency bit i have done this in properties.
    Im looking for image convertors but not having much luck.

    Eddie
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  18. Sparky
    Highly Decorated Member Award 500 Likes Award

    Sparky Zettabyte Poster Moderator

    10,718
    543
    364
    Certifications: MSc MCSE MCSA:M MCSA:S MCITP:EA MCTS(x5) MS-900 AZ-900 Security+ Network+ A+
    WIP: Microsoft Certs
  19. zxspectrum

    zxspectrum Terabyte Poster Forum Leader Gold Member

    2,092
    216
    244
    Cheers Johnny, i just got ifranview, ive only used it before for saving screenshots etc. Any tips on the image bit would be helpful. Ive got an image loaded up now so ill have a play etc.

    Mat, the colour being 32 bit or 64 bit? Im getting 16,7 Millions (24 BitsPerPixel) if that means anything to you ??

    Eddie
     
    Certifications: BSc computing and information systems
    WIP: 70-680
  20. Mathematix

    Mathematix Megabyte Poster

    969
    35
    74
    That's fine mate. With 24-bit you're just missing the extra 8 bits for the alpha (transparency) channel, whereas 32 bits provide 8 bits for the red channel, 8 for the green, 8 for the red and finally 8 for the alpha channel.

    If you are going to introduce alpha blending to your model you will need the extra alpha bits.
     
    Certifications: BSc(Hons) Comp Sci, BCS Award of Merit
    WIP: Not doing certs. Computer geek.

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.