pixels

Finding OpenGL texture size in bytes after it was loaded

Hey, I have a texture loaded with glTextImage2D. I want to get the texture's size after it was loaded to the VRAM, what do I need to do? My internal format is RGBA and the texture's format varies. ...

How can I edit individual pixels in a window?

I want to create a simple video renderer to play around, and do stuff like creating what would be a mobile OS just for fun. My father told me that in the very first computers, you would edit a specific memory address and the screen would update. I would like to simulate this inside a window in Windows. Is there any way I can do this with...

OpenGL getting perspective pixel data

Hello, I am working with a 3D rendering of a large field containing various objects. My program views this field in perspective from a high point. I need to access the pixel data of (only) a rectangle in the field as viewed from above. I have the coordinates of this rectangle in the field, and would like to: (a) Find the pixels corresp...

How to set the opacity of random pixels to 0 of a UIImage?

Hi, I'm working on an iPhone app which needs to have the function to reveal an image after some actions. For example: I have 2 UIImages on top of each other. The UIImage on the back is the image to reveal. The UIImage on top needs to cover this image. I need a method that I can tell to reveal the image. So if I call the method, and le...

balancing a scale

Hey guys i have a formula the percentage of cals_in vs cals_out (out of 200%) i created a scale to show the difference in the values in terms of percentage. The problem is I wanna convert the difference in terms of pixels height to move the scale up or down function setScalesToValue(fValue) { document.getElementById("cals_in").styl...

Lowercase letters tail height (g, j, p, q, y)

Hi, This question is a little bit odd. I have to make sure of the distance between letters above and below. Now when calculating a letter height in Pixel, say font size = 14px does this mean my alloted pixel height for a letter is 14 pixels? What about the letters with tail? How are their tails alloted in Pixels? ------------ | **...

Editing an image in iphone sdk?

Hey guys! So right now I'm making an app that takes the data of pixels (like rgb values) and I want to modify these values to smoothen out the image. I already have the getting the values done, now I just need to set them. How would I go about changing the rgb values on pixels in an image? Thanks in advance! ...

How is font size calculated?

I have a complex js function with an equation in which I actually need to understand how much space in pixels font sizes take up. I have noticed that some font's sizes are different depending on the font. How is a font's size calculated? If its set to 12px, in css, what does the 12px mean? Is that 12px wide? High? Or is it a diagonal p...

How do I find the display size of my system in Emacs?

I use the same .emacs across multiple machines, operating systems and platforms. I would like the default frame size of Emacs upon invocation to be relative to the available screen size (e.g. 96 lines work very well on a 1600x1200 desktop screen, but on an 1280x800 laptop I need to specify no more than 68 lines). Is there an emacs-lisp ...

selecting the pixels with highest intensity in opencv

can anyone help me to find out the top 1% (or say top 100 pixels)brightest pixels with their locations of a gray image in opencv. because cvMinMaxLoc() gives only brightest pixel location. Any help is greatly appreciated. ...

java function to determine height of an image with the given width?

im having an image(some dimensions) i set the width of some pixel position. i need a java method to calculate the height of the image to display properly... please help me.... urgent.. ...

[C++] - GetDIBits and loop through pixels using X, Y

I'm grabbing a portion of the screen and scanning through the pixels for a certain color range. I looked at MSDN's Capturing an Image example and know how to use the functions. I can get the bits into an array, but I'm not sure how to do it in such a way that I can loop through it as I would an image. A pseudo-example (which I'm sure i...

WPF - 'Stride' Woes from a TransformedBitmap Object.

I have a 2208 x 3000 TransformedBitmap object with format {Indexed8} that I'm do .CopyPixels() on. I'm using (int)((formattedBitmap.PixelWidth * formattedBitmap.Format.BitsPerPixel + 7) / 8) (assuming 'formattedBitmap' is the name of the image from which I'm trying to copy the pixels) for the 'stride' value in my method call and an ...

Android Show Different Image on Different Resolution

I am attempting to create a very graphically intensive android application. Almost all of the UI is based on bitmaps and I would like to support as many different devices as possible and to have the app look great in all of them. Is it possible to embed different resolutions for each image and have a different image displayed on each de...

C++, Negative RGB values of pixels using OpenCV

I'm using OpenCV to iterate through an image and find the colour of each pixel, here's some of the code I'm using: IplImage* img = cvLoadImage("c:\\test.png"); int pixels = img->height * img->width; int channels = img->nChannels; for (int i = 0; i < pixels*channels; i+= channels) { unsigned char red = img->imageData[i + 2]; u...

photoshop pt size conversion to web

In photoshop, my text size is 5.12pt and font type is Arial. My base font size for my website is 13px/1.23 Arial. How would I convert the 5.12pt size to the same size on web? Thanks! ...

Web style fonts in Photoshop

I design web templates in Pho]sions are different. Is there a plugin or a ...

Android - fix TextView width by string

Hi, I think the answer to this question is probably so simple, but I'm struggling.... I have a TableLayout with multiple columns. I want the last column to be of a fixed width, but I want to define that width to just be able to hold the widest possible string from my program. i.e. it is always wide enough to contain "THIS STRING" witho...

Change Black pixels to white and vice versa

Hey there, I can't figure out how to make Jython realize that the pixel is either (0,0,0) or (255,255,255). Basically I'm just trying to convert all white pixels to black and vice versa. Here's what i have sofar :S def changeBlackWhite(picture): for x in range(getWidth(picture)): for y in range(getHeight(picture)): ...