pixel

Is there a formula for converting a pixel coordinate in 1680x1050 to 1920x1080

风流意气都作罢 提交于 2019-12-11 05:27:06
问题 I'm playing around with converting some macros for a game (a tale in the desert) and found one I'm playing with trying to convert from the res it was written for (1680x1050) to my resolution (1920x1080). The macro does a series of clicks on the screen at certain coordinates. I'd like to try to get it as close as possible if such a formula exists and then tweak from there. Thanks guys. 回答1: 1680 * x = 1920 1050 * y = 1080 Solve for x and y and that's what you'll need to multiply your

Win 10 Excel 2016 Unexplained PixelsToPoints coefficient to position UserForm

浪子不回头ぞ 提交于 2019-12-11 05:07:34
问题 Preambule When trying to position a UserForm at a particular Pixel position (stored in a POINTAPI Type structure), one must convert the Pixel coordinates to Point coordinates to be able to set the UserForm.Left and UserForm.Top VBA properties. Let's call this coefficient K. From my tests, I came to understand that in my case, GetWindowRect and the VBA positioning properties of a UserForm ( Left , Top , Width , Height ) includes the shadows around the window (of class "ThunderDFrame")

rDGAL, Tiff Files, and WorldFile

元气小坏坏 提交于 2019-12-11 04:45:16
问题 I have a set of tiff files that display convective weather across the continental US (NAD83 projection) in pixel locations from Iowa State University. My goal is the transformation of the pixel locations to lat/lon data. I read in the tiff file data as a SpatialGridDataFrame with... imageData = readGDAL( fileNameDir, silent = TRUE ) I read somewhere that readGDAL will seek a World File if no projection data exist in the tiff file, so I created such a file (nad83WorldFile.wld) with the

Finding pixel position

∥☆過路亽.° 提交于 2019-12-11 04:31:21
问题 public static void sample(BufferedImage image) { int width = image.getWidth(); int height = image.getHeight(); int value[][] = new int[width][height]; int valueR[][] = new int[width][height]; int valueG[][] = new int[width][height]; int valueB[][] = new int[width][height]; for (int j = 0; j < height; j++) { for (int i = 0; i < width; i++) { int pixel = image.getRGB(i, j); value[i][j] = pixel; Color c = new Color(pixel); valueR[i][j]= c.getRed(); valueG[i][j] = c.getGreen(); valueB[i][j] = c

can an element have a a decimal height in html/css?

别说谁变了你拦得住时间么 提交于 2019-12-11 03:35:19
问题 I am working on a site, when I look at it with firebug in firefox various elements seem to have heights like 133.8 pixels, whereas firebug lite in chrome reports the height as 133px for the same method. Is this a difference in the browser rendering, or is it just a curiousity brought on by firebug? I thought pixels had to be measured in integers... 回答1: You can have decimal values in units other than px . Like em, in, etc. 回答2: Funny thing. I just tried today and booth Chrome 25 and Firefox

Can I use a C# dll with unsafe code in VB.NET?

痞子三分冷 提交于 2019-12-11 03:21:06
问题 There is an FastBitmap class for C#, that lets you acces and modify pixel information of am bitmap. I have already used it in some C# project, but I need it now in VB.NET. The problem is that that class uses unsafe code, that is not supported in VB.NET. The question is. Can I compile the FastBitmap class in a dll and use it in VB.NET? [EDIT] Or is there some library that can be used to modfy pixel data in VB.NET? 回答1: Yes, you can do that. If the class doesn't expose any unsafe features in

How to set RGBA Color of a Pixel of an UIImage

爱⌒轻易说出口 提交于 2019-12-11 03:13:04
问题 I am looking for a possibility to set (change) the RGBA color of a Pixel of an UIImage for my Iphone Application. (I actually want to implement some floodfill stuff) So I need something like this: -(void) setPixelColorOfImage: (UIImage*) img atXCord: (int) x atYCord: (int) y withRedColor: (CGFloat) red blueColor: (CGFloat) blue greenColor: (CGFloat) green alpha: (CGFloat) alpha { // need some code her } Because this method will be called quite often, it shouldn't be too slow. Please help. 回答1

Change image per pixel and save to db

老子叫甜甜 提交于 2019-12-11 02:15:49
问题 I'm making a little web-game and I'm looking for a method to manipulate an image per pixel and store it in a mysql db. To be precise, I need to be able to do the following: load image (250 x 250px) from mysql db on screen (image is not visible. For example, the alpha of each pixel is 0); Randomly pick a few pixels en set the alpha to 1; Save the new image over the old image in the mysql db load new image with a number of pixels visible; randomly pick a few pixels en set the alpha to 1; etc..

How to reset value of captured pixel

馋奶兔 提交于 2019-12-11 02:07:33
问题 I'm trying to make a C# function that returns the R, G and B values of every fourth pixel from a screenshot bitmap. This is part of my code. for (int ix = 4; ix < 1366; ix = ix + 4) { x = x + 4; for (int iy = 3; iy < 768; iy = iy + 4) { y = y + 4; System.Drawing.Color pixelcolor = screenshot.GetPixel(x,y); red = kolorpiksela.R; green = kolorpiksela.G; blue = kolorpiksela.B; sumR = sumR + red; sumG = sumG + green; sumB = sumB + blue; } } Where screenshot is a bitmap. At the end the "sums"

How to get Pixel data \ Pixel buffer from a window and extract RGB?

可紊 提交于 2019-12-11 01:17:02
问题 I'm drawing text (textOut) and Rectangles on my window... and I would like to get the RGB buffer from it... How can I do it? 回答1: There are 2 options: First, you can use GetPixel(). I used it a lot. It works fine: COLORREF GetPixel( HDC hdc, int nXPos, int nYPos ); With our days processors picking up even a rect using this function may work in certain cases. Second, you can copy contents of the screen into a bitmap. After that you can place it in clipboard, process with your code, etc. The