Thread: Window with full pixel control

  1. #1
    Registered User
    Join Date
    Aug 2014
    Posts
    11

    Window with full pixel control

    I want to work on a personal project, and my needs are pixel level at. I do not need an entire 1920x1080+ size scree(2million pixels at a max of around 2GB seams like too much to handle for a newb level with ram control). I am proficient with the basics of C programming. Although, my search in the has come up very empty handed- or with people stating "it is too much to handle with the ram"(something among those line)- 240x160 is my max (for now) in the amount of pixels I need to handle.

    I have though of plausible methods of handling this- such as having a base image that I just keep writing over and re-rendering(if necessary ). But I do not know either the best method, or where to start.

  2. #2
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    How does 2 million pixels yield "a max of around 2GB"? At 3 bytes per pixel: 1920 * 1080 * 3 is less than 6MB.

    Anyway, people will want to know what OS you're using, whether you need it to be cross-platform, and perhaps exactly what you are trying to do.

  3. #3
    Registered User
    Join Date
    Aug 2014
    Posts
    11
    Sorry, got my math wrong and must have added an extra 3 digits :/

    I am using Windows, and it is just for my machine for experimenting with. The experiments in basic will require the need to place a pixel on a graph point- within whatever the maximum bounds are (in which for now, either way, I chose 240x160- just like the GBA. Got to start small). Such as , (obviously not something , but just as an example) "PutPixel(x,y,RGB(Color.Red));" where is has X and Y location, and a color for it to be.

  4. #4
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    You could probably find something that looks like this: PutPixel(x,y,RGB(Color.Red));

    Your lack of requirements makes it hard to recommend a particular thing. Lots of things can edit pixels, like game engines to DirectX to SDL to Win32, and these are just things off the top of my head. You'll have to pick a framework that you like.

  5. #5
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    I don't do Windows anymore so I'm pretty out-of-date there. I remember a function called SetPixelV. Do you know how to make a basic Windows program that creates a window? If so, you pass the window's HDC to SetPixelV, perhaps in the WM_PAINT handler. If you haven't made a Windows program before, then you have some learning to do!

    Alternatively, you could use a cross-platform library such as SDL or Cairo.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Take Full Control on Files
    By rock3t in forum C++ Programming
    Replies: 1
    Last Post: 05-21-2012, 07:45 AM
  2. full size of the window, full screen mode
    By nerio in forum C Programming
    Replies: 4
    Last Post: 07-20-2011, 05:25 PM
  3. ATL Control Full Object Model
    By 7thSeeker in forum C++ Programming
    Replies: 6
    Last Post: 05-07-2004, 12:13 PM
  4. Full control of parallel port?
    By The V. in forum Windows Programming
    Replies: 1
    Last Post: 10-28-2001, 03:24 PM

Tags for this Thread