Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Graphics
  4. applying texture to bitmap [modified]

applying texture to bitmap [modified]

Scheduled Pinned Locked Moved Graphics
graphicswinformscomquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Force Code
    wrote on last edited by
    #1

    Trying to emulate the code presented in this article: http://www.codeproject.com/vb/net/bitmapTxtr.asp The method employed in the article is the following 1) Convert texture to grayscale by a method which results in the R, G, and B channels being identical. 2) Make the alpha channel the same as the other three channels as well. Then, 3) Scale the alpha channel by some percentage indicating desired degree of transparency ('float textureTransparency' in code from article) 4) Draw Texture to Bitmap. The code I've written is not identical to that from the article but *should* be effectively the same. However, in my code if I leave out step 2 completely, it makes no difference - the visible results are exactly the same (meaning in my own application the results are the same - I didn't use bitmap from article). This is not what I would expect. I think the article writer said he was primarily a VB programmer, so he may not know what he's doing. (I'm not an expert in GDI+ either.) Should step 2 change the results or not? Can someone answer this definitively? -- modified at 15:16 Friday 3rd August, 2007

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups