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. C / C++ / MFC
  4. How to convert jpg image to rgb

How to convert jpg image to rgb

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicsgame-devtutorial
1 Posts 1 Posters 0 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.
  • S Offline
    S Offline
    simon alec smith
    wrote on last edited by
    #1

    Hello, I have managed to pull a program from one of the articles that displays an image(jpg) I have added the following code to get each pixel on the screen COLORREF color = pDC->GetPixel(x,y); colorNo = (int)GetRValue(color); //Then write values to file for rgb I then create another program to gather what has been writen to file and then display it. Unfortunatly what is displayed is a 'carpet like image' I understand that the return value for GetRValue is a byte so I have casted this. Can any body know why I am having problems. Is there any good programs for this? I am doing this for game purposes, eventualy I would like to get into 3d graphics what programs do the pro's do to save theirs Please can anybody enlighten me. cheers Simon

    modified on Saturday, February 7, 2009 11:57 AM

    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