Results 1 to 3 of 3

Thread: Loss of inofrmations...

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2003
    Perpignan, France

    Loss of inofrmations...

    I everyone, I continue with my bmp picture saga, it's the third episode, welcome for the newcomers!
    Well, let's try to do it short now. I transform bmp picture, but sometimes it appears that there is a lot of loss informations (we can see pixel coming bigger and bigger as the color information go...who know where!).
    Well the thing is I use char array to store the pixel color data (one for the red, one for the green and another for the blue). Then, I do my routine and calcule which pixel should replace another, so I say in C++ language originally "You! Pixel of position i/j your values will be replace by those of the pixel from u/v so from the R:00 G:13 B:F2 you will become a R:00 G:36 B:64" ok? I take a pixel values and replace by another...
    So where the loss of information can occure? May be the pixel coordinate should be float and no int but what I manipule are char array so I don't care of the "true coordinate of the pixel in my screen" because I got the "pixel value in my array"...
    I mean, even if the pixel on my screen is at the x:31.56,y:54.23, this pixel will be store (its value in fact) in an array of int...And do really the pixel coordinate are float?
    For exemple from this original picture:
    sometimes I get things like this one :
    Well, may be it's a bit hard to understand me (but it's always hard to understand sagas), and thanks to the ones who will help me (and thanks to the one woh helped me).

    [This message has been edited by El_Segador (edited 07-14-2003).]

  2. #2
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000

    Re: Loss of inofrmations...

    Difficult to say without seeing the algorithm.
    You do the replacement operation in the same image?
    Looks like you're replicating some lines over and over again.
    If yes, you need to either do this "double buffered", so image iteration n+1 results are stored in a second image not disturbing the source data, then exchange the image source and destination and so on.
    Or if the reads and writes run in a specified direction, you need to choose the order in which you're processing the pixels carefully. Never overwrite data you will source later on.
    Or you have some rounding problem where a number of image colors fall into the same color bucket.
    If this is a continuos application of glReadPixels, replacement, glDrawPixels for example, make sure the coordinates for the glDrawPixels actually lies on a pixel corner to perfectly hit pixel areas.
    If this is drawn with textured quads, what are the filter modes?
    Do you happen to run in 16 bpp?
    You see, the description really lacks an explanation of what you're actually doing.

    [This message has been edited by Relic (edited 07-14-2003).]

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2003
    Perpignan, France

    Re: Loss of inofrmations...

    I use several array to stock my informations, but I guess the problem come from here (I don't use glDrawPixel etc for the moment, I just recreate bmp, I don't display woth openGL yet), I mean, may be I erase some informations before using them...
    I will try to analyse this.
    But I realise is not so easy to help, so thanks.

Similar Threads

  1. Performance loss with glVertexAttribPointer
    By danharibo in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 08-24-2011, 03:35 AM
  2. At a loss for shadow map
    By xoyero in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 02-02-2009, 05:38 PM
  3. A different OpenGL memory loss
    By Lscharpen in forum OpenGL: Windows
    Replies: 2
    Last Post: 10-24-2006, 11:36 AM
  4. Loss of precision
    By castellp in forum OpenGL: GLSL
    Replies: 10
    Last Post: 03-15-2006, 02:08 AM
  5. Memory Loss !!
    By ssaunders in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 04-15-2001, 02:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean