Questions tagged [bitmap]

Data structure for encoding pictures as a set of bits, in which each image pixel is mapped to a bit or a group of bit. Also used for encoding other complex data where each elementary information is mapped to bits, in a similar fashion. For platform specific bitmap API, prefer more specific tags (e.g. android-bitmap or nsbitmapimagerep).

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Converting System.Drawing.Bitmap to a ImageSource memory stream to insert into a PdfSharpCore PdfDocument under Linux

I'm creating a barcode using DataMatrix.NetCore nuget package. I'm attempting to get that inserted into a PDF using PdfSharpCore. The barcode is generated and a bitmap is created, but the conversion ...
Robb Sadler's user avatar
0 votes
1 answer
32 views

Optimizing conversion of OpenCV Mat to BitmapSource for WPF display

Hello Stack Overflow community, I'm working on a real-time face detection application using OpenCvSharp in C#. The current code captures frames from a video source and processes them to detect faces ...
Nicolantonio De Bari's user avatar
0 votes
0 answers
35 views

How to draw a zoomed bitmap on WPF

I want to create a tile editor in WPF. It should display a tile (a bitmap with a maximum dimension 64x64 pixels) as a grid of squares about 2x2 pixels each. If the tile is smaller, like 32x32, the ...
Thorsten Erdmann's user avatar
0 votes
1 answer
59 views

Reading BMP file without Bitmap class for learning purposes, issue with LockBits (C# with unsafe blocks)

I have such Windows Forms project which reads a 24bit RGB BMP file. It all works fine except the method which prints the bitmap to form. There's a commented line of code, which totally replaces the ...
SelfishCrawler's user avatar
0 votes
0 answers
19 views

BarcodeScanner Mlkit example - How to get the codebar image as a Bitmap

I am using the barcode detection example from the following repository: MLKit example In the CameraXLivePreviewActivity activity, the BarcodeScanner class is used to detect the barcode. How can I get ...
gamuza's user avatar
  • 1
-1 votes
2 answers
59 views

Convert PDF to bitmap in C# WPF .NET7 [closed]

I have a WPF app which run in many kiosk machines. In the application, I call an API and it will response the URL of PDF file. I want to print that PDF file by SEWOO LK-B425A printer. But as the ...
HuynhMinh's user avatar
0 votes
0 answers
18 views

Android image cropper not returning original bitmap

I am trying to access both cropped image as well as the original image. Using registerForActivityResult I am able to get the cropped image. I also want to access the original image. I am using only ...
Shashi Ranjan's user avatar
1 vote
1 answer
60 views

Bitmap matrix processing in C

I have an algorithm made to transform a bitmap matrix into an array. The logic behind it is to divide the matrix into smaller quadrants until reaching the units and for each quadrant, if all variables ...
Brennofsr's user avatar
2 votes
1 answer
76 views

How do you turn on/off Linux kernel Virtio features?

Virtio documentation, like here, describes many feature bits that can be set or "negotiated" for a virtio-device. For instance, there is the VIRTIO_RING_F_EVENT_IDX feature that can be ...
wxz's user avatar
  • 2,284
1 vote
0 answers
28 views

Memory Leaking Issue in Android Kotlin While Converting Bitmap Image

I have faced a memory leaking issue in android. I have checked profiler, it shows the native memory increasing at a high rate over time. After checking a little bit time I found I am converting a ...
Al amin Kawsar's user avatar
1 vote
1 answer
45 views

How to display an image from an API in Blazor .NET 7?

I have two microservices. One generates images and the second (Blazor) recieves this image. I want then to display that image WITHOUT saving it anywhere (I have bytes of that image and SKBitmap, ...
Iw4n's user avatar
  • 21
-1 votes
1 answer
62 views

How to create a DIB after loading a 32-bit PNG image with alpha channel?

I want to use the BITMAPINFO structure to define the DIB of the 32-bit png image, so that I can then use StretchDIBits to send the image to the printer for printing. I tried the following code: HDC ...
douxiaobao's user avatar
0 votes
0 answers
32 views

what could be the best way to work with images in android specially images that are sent via api?

I've developed a billing app that syncs items locally using a Room database for fast retrieval. Now, my client is interested in displaying images alongside the items, which are uploaded from a web ...
Shankar Bhandari's user avatar
0 votes
0 answers
17 views

BitmapFactory.decodeStream not working for Android 8?

I use this code to get image as bitmap from internal storage. This code not working for Android 8. I gives java.io.FileNotFoundException: (No such file or directory) error. private void ...
uyarc's user avatar
  • 578
0 votes
0 answers
88 views

how to resolve Could not copy bitmap to parcel blob in android 12

I am converting bitmap to File and sending to the server , after response is successful then have go another activity but it getting crash in android 12 but working fine in android 11 E FATAL ...
Jaydip Chavda's user avatar
0 votes
0 answers
59 views

When copying pixel color values via Marshal.Copy, an image with spaces is obtained

enter image description here When trying to copy data from one Bitmap to another, for some reason the image looks torn. This is the code I copied from microsoft documentation. And it should work, but ...
Tirais's user avatar
  • 1
0 votes
0 answers
11 views

while scrolling Images gets rotate in imageview in recycleview

enter image description hereloading 200 images from url in array and showing in recyclerview but while scrolling the rendered images gets rotate , it get tilt in the imageview. I have used Glide, ...
Pooja Shelke's user avatar
0 votes
0 answers
27 views

Bitmap Compression Error thowing in android 13 oneplus and oppo 5g devices in android

when compressing image in working in oneplus and oppo android 13 5g Phone thowing error [enter image description here](https://i.stack.imgur.com/LkbS7.png) code : @RequiresApi(Build.VERSION_CODES.O) ...
SYED ABUTHAHIR's user avatar
0 votes
3 answers
57 views

Converting a bitmap to bytearray to be displayed on an e-paper

so I have to convert a bitmap that is 400x300 into a byte array with exactly 15000 size. It has to be displayed on an e-paper screen so it can only be black/white/gray. This is my attempt so far: fun ...
brmbrm's user avatar
  • 1
-3 votes
1 answer
33 views

Convert View to PDF (more one page)

I have a dialog containing text and images from user input, and I want to convert it to pdf (A4 size page). When I convert the window to bitmap and then to PDF, The bitmap is not complete because the ...
ezz sab's user avatar
0 votes
1 answer
29 views

Ghostscript.NET and trouble with converted file dimensions

I'm trying to handle the Ghostscript.NET 1.2.0.0 plugin to convert an .eps file to .bmp using a program written in C# with Windows Forms. https://www.nuget.org/packages/Ghostscript.NET/1.2.0 My ...
Karlsson's user avatar
0 votes
2 answers
48 views

Android ImagePicker/MediaStore returns rotated image

I know this question has been asked many times but there is no best-case answer to be found. MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri) I am retrieving the bitmap from this ...
Exitron's user avatar
  • 17
1 vote
2 answers
78 views

vectorized & in numpy

My use case is to use numpy for bitmap (that is, set operations using bit encoding). I use numpy arrays with uint64. If I have a query with 3 entries, I can then do bitmap | query !=0 to check if any ...
Guillaume's user avatar
  • 1,277
0 votes
1 answer
25 views

C# Displaying 8BPP indexed bitmap in PictureBox causes color issues

I am having issues displaying 8bpp indexed OpenCV Mat in ImageBox, The image is large size, and I am trying to avoid copying pixel by pixel The code for the image conversion and display is below But ...
Mich's user avatar
  • 3,202
0 votes
1 answer
47 views

DPI of screenshot taken using Graphics changes to 3700 after use in TesseractOCR

I am using c# winforms and I am taking a screenshot using Graphics.copyfromscreen private Bitmap CaptureImage() { // Create a bitmap with the specified dimensions ...
LaysYogurt's user avatar
0 votes
0 answers
21 views

C++ Builder Firemonkey effects on bitmaps

The Firemonkey platform for C++ Builder has some nice graphical effects that one can use on a TImage control. Is it possible to use some of these effects on a bitmap in memory? If so, how is that done?...
Drewski7280's user avatar
0 votes
0 answers
76 views

Pixel Copy crash: window doesn't have a backing surface

I'm trying to get a screenshot of a window, basically a bitmap. I need to also get the screenshot from accelerated hardware devices. I have implemented the PixelCopy API as the following: ...
MACROSystems's user avatar
0 votes
0 answers
27 views

CS50 PSET4 Filter Blur Black Photo

When I run the program it outputs a black picture for some reason. The goal is to use box blur effect and get all the RGB values for all pixels within 1 row and column and find the average For ...
need-help's user avatar
0 votes
1 answer
46 views

Print pdf in multiple pages if one page not enough

I'm trying to create a PDF from layout; I converted the layout to bitmap and then printed into the pdf page. The application converts the output into a long PDF page, but I want to divide the bitmap ...
HGSu's user avatar
  • 25
0 votes
1 answer
72 views

Jimp returning wrong mime type

I wrote a bitmap parser that should return jimp object (image) and im getting error "Unsupported MIME type: audio/mpeg" Here's the code: var mid = Buffer.from(mapbitmap, 'base64'); var ...
FrostX's user avatar
  • 23
0 votes
0 answers
12 views

RoaringBitMap contains() array?

I'm experimenting with RoaringBitMaps in Java using a custom Elasticsearch plugin and doing rBitmap.contains(1111) works perfectly. Now, if I do rBitmap.contains([1111,2222,3333]) , will not work as ...
llermaly's user avatar
  • 2,340
0 votes
0 answers
58 views

canvas.drawBitmap on bitmap base on specific location in jetpack compose

I have an image and i want to add a signature image on it in the position that the user place it on the screen and press "save". I have tried in this way: fun generateComposedImage(...
Linoy Cohen's user avatar
2 votes
2 answers
50 views

picture scale with out quality loss

I am not a C# developer (embedded developer with C) but I have been forced to do a project which requires me to add a barcode to a PNG and print it, if the resolution of the picture is high, the ...
S2G's user avatar
  • 121
0 votes
1 answer
87 views

how to convert byte[] to image

how to convert byte[] to Bitmap var ms = new MemoryStream(img_bytes, 0, img_bytes.Length); ms.Position = 0; Bitmap obj = new Bitmap(ms); // Error: Parameter is not valid tried to convert byte[] to ...
slorate's user avatar
0 votes
0 answers
32 views

Loading 8bpp grayscale images in C# Bitmap [duplicate]

BMP and PNG files are loaded with different pixel formats, even if external tools show 8bpp grayscale for them Every time when I'm loading 8bits grayscale bmp image to C# Bitmap, it's loaded as 8bit ...
Nedrith's user avatar
  • 11
1 vote
0 answers
68 views

Convert bitmap to video in Android

I'm trying to convert two lists of bitmap to video. First list are the main bitmaps that make a video and second bitmap list contains the bitmap that would be drawn on the video frame by frame. Both ...
Adnan Aslam's user avatar
0 votes
0 answers
37 views

Bitmap Image Blur

I am trying to box blur a bmp image in a problem set in cs50, the code I wrote successfully identifies a middle pixel which is surrounded by 8 others. The goal is to take the average value of red, ...
Pyro's user avatar
  • 38
0 votes
0 answers
14 views

How to unfold a Compressed bitmap data sent by android to a Python flask based API

I am sending a bitmap (after creating a rescaled bitmap of fixed size of 750x900) after compression to a flask based API. public String BitMapToString(Bitmap bitmap){ ...
Mathpdegeek497's user avatar
0 votes
0 answers
51 views

Converting bitmap to byte array not giving the expected value in C# [duplicate]

I'm trying to load in a 16bpp grayscale image (.tiff file) as a bitmap, but I have to process and trim this image. To do that, I thought I'd need to convert it into a byte array first, and then delete ...
Denis Hu's user avatar
0 votes
1 answer
559 views

How to read Stable Diffusion Prompt from meta data in PNG file in C#

I tried the bitmap class and the information stored in PropertyItems doesn't appear to have any stable diffusion prompt information (eve if the Id isn't 0x0010). Any help would be appreciated. using (...
Philip's user avatar
  • 147
1 vote
1 answer
56 views

Bitmap image is getting scaled and is not fully visible

I am working on automating the process of overlaying image into another placeholder images,Currently, I have a collection of placeholder images and for each of these placeholder images a new image is ...
G3n1t0's user avatar
  • 198
0 votes
0 answers
9 views

Android canvas drawing undo/redo not working with background image

Canvas drwing success but can't undo or redo this drawing. i want to pin over the background image. it will be single pin draw or multiple pin or user can draw line. please helping for adding undo/...
AK IJ's user avatar
  • 502
0 votes
0 answers
10 views

Improving Bitmap to Line Conversion for a CoreXY Writing Device

I am currently working on a CoreXY-based writing device that uses a pen to write text on paper, controlled by an Arduino. To convert text into writing instructions, I need to process a bitmap image ...
CodingFox's user avatar
0 votes
0 answers
57 views

How can I pass an arraylist that contains a bitmap to another activity in Kotlin?

So this is my class: class Pricecard(val img: Bitmap?, val title: String?, val weight: String?, val price: String?, val code: String?) : Parcelable { constructor(parcel: Parcel) : this( ...
Meo11's user avatar
  • 3
0 votes
0 answers
26 views

draw a black/white Bitmap with a medianfilter

my task is it to laod a black/white Bitmap in an Boolean [][] array. every bit has some special informations. For now i got the bitmap load. But know i struggel with the drawing ob the Bitmap and the ...
Marc's user avatar
  • 1
0 votes
1 answer
126 views

"deprecated" vs "Field requires API level 30 (current min is 21)" [duplicate]

If I write: bmp.compress(Bitmap.CompressFormat.WEBP_LOSSLESS, 80, image) Android Studio shows an error message: Field requires API level 30 (current min is 21) And if I write: bmp.compress(Bitmap....
kora bertrand's user avatar
0 votes
1 answer
86 views

How to get the actual bytes of a bitmap in C++ with either vector<bool> or Boost::dynamic_bitset?

I am developing a compressor that needs to handle bitmaps, and I wonder how to best handle it in C++. Here, a bitmap means an array of boolean values but each value is stored in a bit instead of a ...
Yuanjian Liu's user avatar
0 votes
1 answer
34 views

Method that turns image to BW does not work

public float ToBlackAndWhite(BlackWhiteMode mode) { var data = _bmp.LockBits(new Rectangle(0, 0, Width, Height), ImageLockMode.ReadWrite, _bmp.PixelFormat); var IsWhite = mode ...
Simon's user avatar
  • 1
0 votes
0 answers
31 views

wxPython GenStaticBitmap does not SetBitmap() when setting a bitmap from a list

I am building a wxPython app that acts like a drawing application and has redo/undo (ctrl+z, ctrl+y) functionality which is currently not working. I am using the GenStaticBitmap to remove flickering ...
malabbism's user avatar
-1 votes
1 answer
70 views

Create cone gradient like in google maps in c#

I want my end result to be something like this and my 3 requirements are Control the color Control the angle of the cone Control the degree how "wide" the angle is(between 0-360) My code ...
styx's user avatar
  • 1,852

1
2 3 4 5
315