Search Results

Search found 2333 results on 94 pages for 'mr pixel'.

Page 7/94 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Easy Method to Change Color on UI Elements

    - by A13X
    This isn't a language-specific thing as far as I'm concerned. I was wondering what may be a quick way to change the COLOR of a certain on-screen element such as a button and its associated text. I would assume there is a trick to making a graphics engine so maybe individuals pixels or groups of sprites can have their colors easily shifted. A lot of game interface buttons and such have this so you know when an event like a click has occurred. Any pseudo code would be helpful and I am working in Android (not XML fluff), but again, this probably is not a very specific question, just an inquiry on how to go about this.

    Read the article

  • Bunny Inc. – Episode 2. Mr. CIO meets Mrs. Sales Manager

    - by kellsey.ruppel(at)oracle.com
    How can you take advantage of a modern customer experience in your sales cycle? What can Mr. CIO come up with to improve customer interaction and satisfaction? See how Enterprise 2.0 solutions can help Bunny Inc. improve business responsiveness to market requests, sell more and simplify post sales support! Bunny Inc. - Episode 2. Mr. CIO meets Mrs. Sales ManagerTechnorati Tags: UXP, collaboration, enterprise 2.0, modern user experience, oracle, portals, webcenter, e20bunnies

    Read the article

  • Per-pixel per-component alpha blending in Windows

    - by Crend King
    I have a 24-bit bitmaps with R, G, B color channels and a 24-bit bitmap with R, G, B alpha channels. I want to alpha blend the first bitmap to a HDC in GDI or RenderTarget in Direct2D with the alpha channels respectively. For example, suppose for one pixel, the bitmap color is (192, 192, 192), the HDC color is (0, 255, 255) and the alpha channels are (30, 40, 50). The final HDC color should be (22, 245, 242). I know I can BitBlt the HDC to a memory HDC first, do alpha blending by manually calculating the color of each pixel and finally BitBlt back. I just want to avoid the additional blitting and leave APIs do their job (faster since they are in kernel space). The first idea comes to my mind is to split the source bitmap into 3 red-only, green-only and blue-only 8-bit bitmaps, do normal alpha blending, then composite the 3 output bitmaps into the HDC. But I don't find a way to do the splitting and composition natively in Windows (would Direct2D layer help?). Also, the splitting and compositing may require many additional copying. The performance overhead would be too high. Or maybe do the alpha blending in 3 passes. Each pass apply the blending for one channel, while maintaining the other 2 unchanged. Thanks for any comment. EDIT: I found this question, and the answer should be good reference to this problem. However, besides AC_SRC_OVER, there is no other blending operation supported. Why don't Microsoft improve their API?

    Read the article

  • OpenGL Pixel Format Attributes (NSOpenGLPixelFormatAttibutes) explanation?

    - by nacho4d
    Hi, I am not new to OpenGL, but not an expert. Many tutorials teach how to draw, 3D, 2D, projections, orthogonal, etc, but How about setting a the view? (NSOpenGLView in Cocoa, Macs). For example I have this: - (id) initWithFrame: (NSRect) frame { GLuint attribs[] = { //PF: PixelAttibutes NSOpenGLPFANoRecovery, NSOpenGLPFAWindow, NSOpenGLPFAAccelerated, NSOpenGLPFADoubleBuffer, NSOpenGLPFAColorSize, 24, NSOpenGLPFAAlphaSize, 8, NSOpenGLPFADepthSize, 24, NSOpenGLPFAStencilSize, 8, NSOpenGLPFAAccumSize, 0, 0 }; NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: (NSOpenGLPixelFormatAttribute*) attribs]; return self = [super initWithFrame:frame pixelFormat: [fmt autorelease]]; } And I don't understand very well their usage, specially when combining them. For example: If I want my view to be capable of full screen should I write NSOpenGLPFAFullScreen only ? or both? (by capable I mean not always in full screen) Regarding Double Buffer, what is this exactly? (Below: Apple's definition) If present, this attribute indicates that only double-buffered pixel formats are considered. Otherwise, only single-buffered pixel formats are considered Regarding Color: if NSOpenGLPFAColorSize is 24 and NSOpenGLPFAColorSize is 8 then it means that alpha and RGB components are treated differently? what happen if I set the former to 32 and the later to 0? Etc, etc,In general how do I learn to set my view from scratch? Thanks in advance. Ignacio.

    Read the article

  • Calculate pixels within a polygon

    - by DoomStone
    In an assignment for school do we need to do some image recognizing, where we have to find a path for a robot. So far have we been able to find all the polygons in the image, but now we need to generate a pixel map, that be used for an astar algorithm later. We have found a way to do this, show below, but the problem is that is very slow, as we go though each pixel and test if it is inside the polygon. So my question is, are there a way that we can generate this pixel map faster? We have a list of cordinates for the polygon private List<IntPoint> hull; The fuction "getMap" is called to get the pixel map public Point[] getMap() { List<Point> points = new List<Point>(); lock (hull) { Rectangle rect = getRectangle(); for (int x = rect.X; x <= rect.X + rect.Width; x++) { for (int y = rect.Y; y <= rect.Y + rect.Height; y++) { if (inPoly(x, y)) points.Add(new Point(x, y)); } } } return points.ToArray(); } Get Rectangle is used to limit the search, se we don't have to go thoug the whole image public Rectangle getRectangle() { int x = -1, y = -1, width = -1, height = -1; foreach (IntPoint item in hull) { if (item.X < x || x == -1) x = item.X; if (item.Y < y || y == -1) y = item.Y; if (item.X > width || width == -1) width = item.X; if (item.Y > height || height == -1) height = item.Y; } return new Rectangle(x, y, width-x, height-y); } And atlast this is how we check to see if a pixel is inside the polygon public bool inPoly(int x, int y) { int i, j = hull.Count - 1; bool oddNodes = false; for (i = 0; i < hull.Count; i++) { if (hull[i].Y < y && hull[j].Y >= y || hull[j].Y < y && hull[i].Y >= y) { try { if (hull[i].X + (y - hull[i].X) / (hull[j].X - hull[i].X) * (hull[j].X - hull[i].X) < x) { oddNodes = !oddNodes; } } catch (DivideByZeroException e) { if (0 < x) { oddNodes = !oddNodes; } } } j = i; } return oddNodes; }

    Read the article

  • How can I resize pixel art in Pyglet without making it blurry?

    - by Renold
    I have a tileset of 8x8 pixel images, and I want to resize them in my game so they'd be double that (16x16 pixels, e.g. turning each pixel into a 2x2 block.) What I'm trying to achieve is a Minecraft-like effect, where you have small pixel images scale to larger blockier pixels. In Pyglet, the sprite's scale property blurs the pixels. Is there some other way? Update: So I changed my code, but I'm still having the same issue (nothing changed.) Of course, the GL commands are kind of mysterious to me: gl.glEnable(gl.GL_TEXTURE_2D) image = resource.image('tileset.png') texture = image.get_texture() gl.glBindTexture(gl.GL_TEXTURE_2D, texture.id) gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_NEAREST) texture.width = 16 # resize from 8x8 to 16x16 texture.height = 16 image.blit(100, 30) # draw Is there something else I should try?

    Read the article

  • Pixel d'Avril : le salon Nantais du jeu vidéo se tient ce week-end, conférences, tournois et démos au menu de ce salon bénévole

    Pixel d'Avril : le salon nantais du jeu vidéo se tient ce week-end Conférences, tournois et démos au menu du salon du jeu vidéo Pixel d'Avril est un salon autour des jeux vidéos, du développement et de la culture Geek. Rétro-gaming pour les nostalgiques, concours de machinima (film avec des moteurs de jeux) pour les créatifs, démonstrations et espaces LAN (jeux en réseaux, réservés la nuit pour les tournois sur Halo Reach et sur Age of Empire II), « Pixel d'Avril » est aussi un lieu de rencontre pour les professionnels (studios, éditeurs, etc.). Cette année, les ateliers et les conférences du weekend seront liés au thème du son dans le jeu vidéo.

    Read the article

  • Pixel d'Avril : le salon Nantais du jeux vidéo se tient ce week-end, conférences, tournois et démos au menu de ce salon bénévole

    Pixel d'Avril : le salon nantais du jeux vidéo se tient ce week-end Conférences, tournois et démos au menu du salon du jeux vidéo Pixel d'Avril est un salon autour des jeux vidéos, du développement et de la culture Geek. Rétro-gaming pour les nostalgiques, concours de machinima (film ave des moteurs de jeux) pour les créatifs, démonstrations et espaces LAN (jeux en réseaux, réservés la nuit pour les tournois sur Halo Reach et sur Age of Empire II), « Pixel d'Avril » est aussi un lieu de rencontre pour les professionnels (studios, éditeurs, etc.). Cette année, les ateliers et les conférences du weekend seront liés au thème du son dans le jeu vidéo.

    Read the article

  • Get pixel's color in C++, Linux

    - by Stefan
    Hello, I'm looking for a possibility to get the color of a pixel with given screen coordinates (x,y) in c++ / Linux? Maybe something similarly like getPixel() in Windows. I spent the whole day to find sth but without any success. Thanks, Stefan

    Read the article

  • place and show pixel in the Cartesian plane graph in JavaFX

    - by user3671803
    I have this method to draw the Cartesian plane in JavaFX, using canvas and would like to know if it is possible to place or show the pixel: public class Grafics extends StackPane { private Canvas canvas; public void Grafics(){ GridPane grid = new GridPane(); grid.setPadding(new Insets(5)); grid.setHgap(10); grid.setVgap(10); canvas = new Canvas(); canvas.setHeight(500); canvas.setWidth(700); GridPane.setHalignment(canvas, HPos.CENTER); grid.add(canvas, 0, 2); GraphicsContext gc = canvas.getGraphicsContext2D(); gc.setFill(Color.BLACK); gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight()); gc.setFill(Color.WHITE); gc.fillRect(1, 1, canvas.getWidth() - 2, canvas.getHeight() - 2); drawAxesXY(gc); //call the method drawAxes getChildren().addAll(grid);// add an gridpane in stackpane } private void drawAxesXY(GraphicsContext gc1) { PixelWriter pixelWriter = canvas.getGraphicsContext2D().getPixelWriter(); gc1.setFill(Color.WHITE); gc1.setStroke(Color.BLACK); gc1.setLineWidth(1.5); gc1.strokeText("Y", 350, 30); gc1.scale(1, 1); gc1.translate((canvas.getHeight() / 50) - (canvas.getWidth() / 10), canvas.getHeight() / 50); gc1.strokeLine(canvas.getWidth() - 300, canvas.getWidth() - 300, canvas.getHeight() - 100, canvas.getHeight() / 30); pixelWriter.setColor(300, 300, Color.RED); gc1.strokeText("X", 620, 220); gc1.translate(canvas.getWidth() - (canvas.getHeight() / 10), -220); gc1.rotate(90.0); gc1.setFill(Color.WHITE); gc1.setStroke(Color.RED); gc1.setLineWidth(1.5); gc1.strokeLine(canvas.getWidth() - 250, canvas.getWidth() - 250, canvas.getHeight() - 50, canvas.getHeight() / 30); pixelWriter.setColor(620, 220, Color.RED); } } I put a line black and the other red http://postimg.org/image/tewjhco4z/ and I wanna know if is possible to place or show the pixel in Figure like this http://postimg.org/image/98k9mvnb3/

    Read the article

  • slicing up a very big jpg map image , 49000* 34300 pixel

    - by sirvan
    hi i want to write a mapviewer, i must to work small tile of big map image file and there is need to tiling the big image, the problem now is to tiling big image to small tiles (250 * 250 pixel or like this size) so on, i used ImageMagic program to do it but there was problem now is any other programing method or application that do tiling? can i do it with JAI in java? how?

    Read the article

  • Encode complex number as RGB pixel

    - by Vi
    How is it better to encode a complex number into RGB pixel and vice versa? Probably (logarithm of) an absolute value goes to brightness and an argument goes to hue. Desaturated pixes should receive randomized argument in reverse transformation. Something like: 0 - (0,0,0) 1 - (255,0,0) -1 - (0,255,255) 0.5 - (128,0,0) i - (255,255,0) -i - (255,0,255) (0,0,0) - 0 (255,255,255) - e^(i * random) (128,128,128) - 0.5 * e^(i *random) (0,128,128) - -0.5 Are there ready-made formulas for that?

    Read the article

  • slicing up a very big jpg map image , 140000*125000 pixel

    - by sirvan
    hi i want to write a mapviewer, i must to work small tile of big map image file and there is need to tiling the big image, the problem now is to tiling big image to small tiles (250 * 250 pixel or like this size) so on, i used ImageMagic program to do it but there was problem now is any other programing method or application that do tiling? can i do it with JAI in java? how?

    Read the article

  • smallest filesize for transparent single pixel image

    - by zaf
    I'm looking for the smallest (in terms of filesize) transparent 1 pixel image. Currently I have a gif of 49 bytes which seems to be the most popular. But I remember many years ago having one which was less than 40 bytes. Could have been 32 bytes. Can anyone do better? Graphics format is no concern as long as modern web browsers can display it and respect the transparency.

    Read the article

  • finding "distance" between two pixel's colors.

    - by igor
    Once more something relatively simple, but confused as to what they want. the method to find distance on cartesian coordinate system is distance=sqrt[(x2-x1)^2 + (y2-y1)^2] but how do i apply it here? //Requires: testColor to be a valid Color //Effects: returns the "distance" between the current Pixel's color and // the passed color // uses the standard method to calculate "distance" // uses the same formula as finding distance on a // Cartesian coordinate system double colorDistance(Color testColor) const;

    Read the article

  • Optimal pixel format for drawing on iPhone?

    - by Felixyz
    Pretty simple question: when doing some pretty intense drawing with CoreGraphics on the iPhone, how can I specify the pixel format to get optimal performance? Is the format that I get from the context via UIGraphicsGetCurrentContext per definition the best one? I know that RGB565 is supposed to be the fastest to use in OpenGL. Does that go for CoreGraphics as well? General advice?

    Read the article

  • Draw Pixel using OpenGLEs for Android

    - by Shubh
    How can I draw a pixel(2D view)for Android using OpenGlEs. In Simple when we use draw(Canvas canvas){...} to draw, so using it we draw canvas.drawPoint(i, j, paint); ..but in OpenGlEs still I haven't got any function like it. Please reply Thank in Advance

    Read the article

  • Getting RGB values for each pixel from a 24bpp Bitmap in C

    - by seven
    Hello, i want to read the RGB values for each pixel from a .bmp file , so i can convert the bmp into a format suitable for gba . so i need to get just the RGB for each pixel and then write this information to a file. i am trying to use the windows.h structures : typedef struct { char signature[2]; unsigned int fileSize; unsigned int reserved; unsigned int offset; }BmpHeader; typedef struct { unsigned int headerSize; unsigned int width; unsigned int height; unsigned short planeCount; unsigned short bitDepth; unsigned int compression; unsigned int compressedImageSize; unsigned int horizontalResolution; unsigned int verticalResolution; unsigned int numColors; unsigned int importantColors; }BmpImageInfo; typedef struct { unsigned char blue; unsigned char green; unsigned char red; unsigned char reserved; }Rgb; typedef struct { BmpHeader header; BmpImageInfo info; Rgb colors[256]; unsigned short image[1]; }BmpFile; but i only need RGB struct. So lets say i read "in.bmp": FILE *inFile, *outFile; inFile = fopen("C://in.bmp", "rb"); Rgb Palette[256]; for(i=0;i<256;i++) { fread(&Palette[i],sizeof(Rgb),1,inFile); } fclose(inFile); is this correct ? how do i write only the RGB information to a file ? can anyone please give me some information please . Thank you.

    Read the article

  • How to get design mockup as a overlay for quicker development without using Firefox's pixel perfect

    - by metal-gear-solid
    This is FF plugin http://www.pixelperfectplugin.com/ Pixel Perfect is a Firefox/Firebug extension that allows web developers and designers to easily overlay a web composition over top of the developed HTML. Read more: http://pixelperfectplugin.com/how-to-use/walkthrough/#ixzz0eOfezx1N How to get mockup image behind all div like this plugin does.? this tool only shows design behind layout only on firefox and i want to see on all browser.

    Read the article

  • Get pixel color with Rails or anything else

    - by ulf
    I'd like to build a webapp in Rails in which I'd like to determine every pixel's color of a given image (JPEG). Is there any possibility to do that with Rails or JavaScript? The goal is to write an algorithm which determines the "middle color" of the image and uses it for background color of the site. Any suggestion would be appreciated.

    Read the article

  • Hit detection on non-transparent pixel

    - by Abie
    Given a PNG in a web context with some transparent pixels and some non-transparent pixels, is there a way in Javascript to determine if a user has clicked on a non-transparent pixel? A webkit-only solution would be perfectly acceptable.

    Read the article

  • Manipulating pixels using only toDataURL

    - by Chris
    The problem I have is this: I need to be able to dynamically tint an image using Javascript, but I cannot access pixel data via the canvas. I can, however, store the dataURL (or any other text-based data format) and include that with the code, manipulate that data, and then create an image object using that dataURL. My question is, how can I access the RGBA value of each pixel, given only the dataURL. I assume I need to decode the base64 url, but into what format in order to manipulate on the pixel level? And then would be it be as trivial as re-encoding it as base64, slapping it in a url, and the passing to an image? Thanks.

    Read the article

  • Programmatically swap colors from a loaded bitmap to Red, Green, Blue or Gray, pixel by pixel.

    - by eyeClaxton
    Download source code here: http://www.eyeClaxton.com/download/delphi/ColorSwap.zip I would like to take a original bitmap (light blue) and change the colors (Pixel by Pixel) to the red, green, blue and gray equivalence relation. To get an idea of what I mean, I have include the source code and a screen shot. Any help would be greatly appreciated. If more information is needed, please feel free to ask. If you could take a look at the code below, I have three functions that I'm looking for help on. The functions "RGBToRed, RGBToGreen and RGBToRed" I can't seem to come up with the right formulas. unit MainUnit; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls; type TMainFrm = class(TForm) Panel1: TPanel; Label1: TLabel; Panel2: TPanel; Label2: TLabel; Button1: TButton; BeforeImage1: TImage; AfterImage1: TImage; RadioGroup1: TRadioGroup; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var MainFrm: TMainFrm; implementation {$R *.DFM} function RGBToGray(RGBColor: TColor): TColor; var Gray: Byte; begin Gray := Round( (0.90 * GetRValue(RGBColor)) + (0.88 * GetGValue(RGBColor)) + (0.33 * GetBValue(RGBColor))); Result := RGB(Gray, Gray, Gray); end; function RGBToRed(RGBColor: TColor): TColor; var Red: Byte; begin // Not sure of the algorithm for this color Result := RGB(Red, Red, Red); end; function RGBToGreen(RGBColor: TColor): TColor; var Green: Byte; begin // Not sure of the algorithm for this color Result := RGB(Green, Green, Green); end; function RGBToBlue(RGBColor: TColor): TColor; var Blue: Byte; begin // Not sure of the algorithm for this color Result := RGB(Blue, Blue, Blue); end; procedure TMainFrm.FormCreate(Sender: TObject); begin BeforeImage1.Picture.LoadFromFile('Images\RightCenter.bmp'); end; procedure TMainFrm.Button1Click(Sender: TObject); var Bitmap: TBitmap; I, X: Integer; Color: Integer; begin Bitmap := TBitmap.Create; try Bitmap.LoadFromFile('Images\RightCenter.bmp'); for X := 0 to Bitmap.Height do begin for I := 0 to Bitmap.Width do begin Color := ColorToRGB(Bitmap.Canvas.Pixels[I, X]); case Color of $00000000: ; // Skip any Color Here! else case RadioGroup1.ItemIndex of 0: Bitmap.Canvas.Pixels[I, X] := RGBToBlue(Color); 1: Bitmap.Canvas.Pixels[I, X] := RGBToRed(Color); 2: Bitmap.Canvas.Pixels[I, X] := RGBToGreen(Color); 3: Bitmap.Canvas.Pixels[I, X] := RGBToGray(Color); end; end; end; end; AfterImage1.Picture.Graphic := Bitmap; finally Bitmap.Free; end; end; end. Okay, I apologize for not making it clearer. I'm trying to take a bitmap (blue in color) and swap the blue pixels with another color. Like the shots below.

    Read the article

  • underline line thickness always one pixel...

    - by Mark
    ...regardless of font size. Its an mx:Text object. (The Text object is actually being used as a mask so don't know if that's the problem.) If underline is set with the <u> tag in Text.htmlText, or Text.textField.setTextFormat, the underline thickness is always just one pixel which is not acceptable. (There are other problems with <u> so I'm limited to using setTextFormat currently.) Can the thickness of an underline be set through CSS? (textField.styleSheet, etc.) I may have another problem as I already use setTextFormat extensively, and the documentation says you can't use textField.setTextFormat if you use textField.setStyleSheet. I primarily need the underline to simulate correctly the look for an anchor tag.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >