Questions tagged [pixel]

A pixel is the smallest unit that can be represented or controlled on a display. The word pixel is derived from the phrase "picture element".

4067 questions
9
votes
1 answer

Draw 1 pixel stroke-width graph in a A4 svg drawing

I'm currently trying to draw some graphics in svg, the paper size is A4, 1 logic unit stands for 1mm. So I set the viewport to be 297mmx210mm, viewbox as 297x210. The problem now is that stroke-width of the graph I draw is no longer 1 pixel. For…
user2469554
  • 141
  • 2
  • 5
9
votes
1 answer

Working with bitmap in WPF

Is there any sane way to work with bitmaps in WPF? I'd like similar functionality as System.Drawing.Bitmap: be able to load image from file and get and set the color of particular pixels. I know about WriteableBitmap, but I don't want to work with…
svick
  • 236,525
  • 50
  • 385
  • 514
9
votes
1 answer

Image Magick / Detect colors contained on a image

What would be the simple process that would gives an array of the colors contained in an image ?
Ben
  • 5,030
  • 6
  • 53
  • 94
9
votes
2 answers

How to get pixel data from an image using R

Can anyone help me on how to get the RGB pixel data from an image in R? I need this information to compare differences in bird plumage to aid in the understanding of a speciation event. My photos are taken by a digital camera and are now as a…
MariaBioStudent
  • 105
  • 1
  • 1
  • 5
9
votes
3 answers

How to set dynamically the width of a html table column according to its text content?

There is a html table :
- [
pheromix
  • 18,213
  • 29
  • 88
  • 158
9
votes
5 answers

Need Faster way to get RGB value for each Pixel of a Buffered Image

What is the fastest way to get the RGB value of each pixel of a BufferedImage? Right now I am getting the RGB values using two for loops as shown in the code below, but it took too long to get those values as the nested loop runs a total of 479999…
Jony
  • 1,035
  • 7
  • 17
  • 43
8
votes
5 answers

algorithm for finding out pixel coordinates on a circumference of a circle

how do i find out pixel value at certain degree on the circumference of a circle if I know the pixel co-ordinates of the center of the circle, radius of the circle ,and perpendicular angle. Basically, I am trying to draw the hands of a clock at…
Surya
  • 4,922
  • 8
  • 41
  • 54
8
votes
2 answers

How to get the X Y coordinates and pixel size of a TextView?

Given a TextView, is it possible to know at runtime the X and Y coordinates of where it is drawn? Is it also possible to know the size (width/length) in pixels?
michelemarcon
  • 23,277
  • 17
  • 52
  • 68
8
votes
2 answers

Pixel Collision Tracing

I have a character that's say, 20 by 10 pixels large and I have a collision map based on pixels (think worms). What's the best way to trace collision for the character given a velocity greater than 1 pixel per frame. Is there a solution better than…
Fascia
  • 732
  • 6
  • 17
8
votes
3 answers

Painting pixels images in Java

Which method is the best way to create a pixel image with java. Say, I want to create a pixel image with the dimensions 200x200 which are 40.000 pixels in total. How can I create a pixel from a random color and render it at a given position on a…
Tom1983
  • 81
  • 1
  • 1
  • 2
8
votes
1 answer

this pixel's microdata is incomplete or incorrectly formated schema.org

I have created Facebook pixels, which connected well. When I run a debug tool, it selects sample items and lists them but once I try connecting the catalog to the pixel, it shows that the pixel is not ready. Below is the code:
8
votes
3 answers

Different Layouts For Different Screen Sizes On Android?

So I made an app using in Eclipse using the Graphical Editor, AbsoluteLayout, fixed pixel values, etc... just bad practice in general. It defaulted to a 3.7in screen. Is there any way to design a separate layout for each screen size and have the…
Cistoran
  • 1,587
  • 15
  • 36
  • 54
8
votes
3 answers

Drawing "drawables" to a canvas in dp units

I'm trying to figure out if there is a way to draw bitmaps to the canvas in dp units instead of pixels. For example: the following code scales the drawable to 100 * 100 px. How can I instead change it do 100 * 100 dp? int lengthPos = 10; int…
cody
  • 735
  • 3
  • 11
  • 19
8
votes
2 answers

f string formatting for numpy array

Here is my code snippets. It prints the means and the standard deviations from the image pixels. from numpy import asarray from PIL import Image import os os.chdir("../images") image = Image.open("dubai_2020.jpg") pixels = asarray(image) pixels…
passion
  • 387
  • 4
  • 16
8
votes
3 answers

'imagecolorat' and transparency

How it's possible to get the transparency value of a pixel on an image? 'imagecolorat' picks only the index of the color of the pixel at the specified location in the image. With that index I can get the RGB values but not the transparent one. Hope…
Roman
  • 105
  • 1
  • 6