Questions tagged [pixelformat]

124 questions
53
votes
3 answers

Android TextView setTextSize incorrectly increases text size

This is in an extension of TextView. getTextSize() and setTextSize() are not overridden, I do not extend those methods. Programming in 1.6, API level 4. The loop in this code causes size to be multiplied by 1.5 every time it iterates, e.g. if size…
Nathan Fig
  • 14,970
  • 9
  • 43
  • 57
15
votes
2 answers

OpenGL texture upload: UNSIGNED_BYTE vs UNSIGNED_INT_8_8_8_8

I'm calling glTexSubImage2D. If my pixel format is GL_RGBA, then are the pixel types GL_UNSIGNED_BYTE and GL_UNSIGNED_INT_8_8_8_8 fully equivalent? Also, are these two pairs equivalent? Format = GL_RGBA, Type = GL_UNSIGNED_INT_8_8_8_8 Format =…
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
14
votes
3 answers

Confused about PixelFormat

I'm confused about PixelFormat on Android. My device is Motorola Defy. I have two questions: On Android 2.3 getWindowManager().getDefaultDisplay().getPixelFormat() returns 4 what stands for RGB_565. As far as I know my device has 16M colors, that…
ArtemStorozhuk
  • 8,715
  • 4
  • 35
  • 53
7
votes
3 answers

C# Bitmap object, color appearing as transparent

I'm working on a program in C# that takes screenshots of a potion of the user's screen. For the most pert it works as it should, but I've recently run into one issue. There seems to be (at least) one pixel color that always appears as transparent in…
HaLo2FrEeEk
  • 586
  • 7
  • 20
7
votes
1 answer

How can I get the PixelFormat of a BitmapSource

I am using the following to convert a BitmapSource to a Bitmap: internal static Bitmap ConvertBitmapSourceToBitmap(BitmapSource bitmapSrc) { int width = bitmapSrc.PixelWidth; int height = bitmapSrc.PixelHeight; int stride = width *…
Matt Bond
  • 1,402
  • 12
  • 19
7
votes
1 answer

What is PixelFormat.RGBX_888

As the title said, anyone know what is RGBX_8888 pixel format? and what is the difference with RGBA_8888? Is RGBA_8888 offers an alpha channel but RGBX_8888 does not? The android documentation does not give much information on this…
CodingBird
  • 705
  • 2
  • 11
  • 22
6
votes
0 answers

How to create FMX.Graphics.TBitmap with specific pixel format?

Probably I am missing something, but I can't find a way to create FMX bitmap with a specific pixel format. To be more specific, I need to create FMX.Graphics.TBitmap with pixel format BGR_565. The Constructor doesn't have an option to define…
Andrei Galatyn
  • 3,322
  • 2
  • 24
  • 38
6
votes
0 answers

ffmpeg: specify/force pixel format for input H.264 video

I have some MP4 video files missing the pixel format in their header information. I have already tried setting probesize and analyzeduration to their maximum values 2147483647 but that didn't help. So I know these videos are probably corrupt but if…
AndreG
  • 1,948
  • 1
  • 9
  • 13
5
votes
1 answer

How to use PixelFormats.IndexedX with RenderTargetBitmap?

I am looking to render a DrawingVisual (visual in the example) to a bitmap using RenderTargetBitmap with the view to set this bitmap as the background to a Canvas as below: var bmp = new RenderTargetBitmap(2000, 50, 120, 96,…
Gavin S
  • 579
  • 1
  • 9
  • 21
5
votes
2 answers

How to create a transparent bitmap in Direct2D

I need to create a transparent bitmap using Direct2D and draw, by using my device context, on it. ID2D1DeviceContext1* d2dContext = ... ID2D1Bitmap* pBitmap; d2dContext->CreateBitmap( bitmapSize, nullptr, 0, …
Nick
  • 10,309
  • 21
  • 97
  • 201
5
votes
1 answer

Incorrect transformation of frames from YUV_420_888 format to NV21 within an image reader

I configured my code in order to get a stream of YUV_420_888 frames from my device's camera using an imageReader object and the rest of the well known camera2 API. Now I need to transform these frames to NV21 pixel format and call a native function…
user3417052
  • 141
  • 11
5
votes
1 answer

Linux framebuffer pixel bitfield generic implementation

I'm writing a tiny library to interface with Linux's framebuffer abstraction. All of my graphics cards use the same pixel format (one octet per channel, four channels, BGRA ordering), so thus far the library just assumes this format. However, the…
nebuch
  • 6,475
  • 4
  • 20
  • 39
5
votes
1 answer

Open GL - Why are Pixel values in ABGR and how to use them in RGBA

I have some code for loading textures where I'm using DevIL to load the images and then OpenGL creates a texture from the pixels. This code works fine and the texture shows up properly and that's all fine. Besides that I can also make an array from…
aslg
  • 1,966
  • 2
  • 15
  • 20
5
votes
1 answer

How do I choose a pixel format when creating a new Texture2D?

I'm using the SharpDX Toolkit, and I'm trying to create a Texture2D programmatically, so I can manually specify all the pixel values. And I'm not sure what pixel format to create it with. SharpDX doesn't even document the toolkit's PixelFormat type…
Joe White
  • 94,807
  • 60
  • 220
  • 330
5
votes
2 answers

cv::Mat detect PixelFormat

I'm trying to use pictureBox->Image (Windows Forms) to display a cv::Mat image (openCV). I want to do that without saving the Image as a file ('cause i want to reset the image every 100ms). I just found that topic here: How to display a cv::Mat in…
Ciprian
  • 139
  • 1
  • 3
  • 12
1
2 3
8 9