Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

How to convert recyclerview items along with other layout data to bitmap

when capturing the layout to a Bitmap, the non-RecyclerView parts of my layout appear correctly, but the RecyclerView content is missing, How can I correctly convert a layout containing a RecyclerView ...
Sathishkumar G's user avatar
0 votes
1 answer
100 views

Unwanted Vertical lines when generating bmp/png images

Im trying to generate images with stb but the images generated tend to have vertical lines. The code to generate the image data is with this function. u64* pixels = (u64 *) malloc(sizeof (u64) * ...
user140202's user avatar
0 votes
1 answer
93 views

Print TSPL command BITMAP

enter image description here I'm trying to print a picture "+" via TSPL command BITMAP: SIZE 58 mm, 40 mm CLS BITMAP 150, 200, 8, 37, 1, 00007ffffe000000 00007ffffe000000 00007ffffe000000 ...
Jojo_ Pis_ Gera_Pug's user avatar
0 votes
1 answer
113 views

Can't properly align grid to bitmap in winform

I have a problem with winform Graphics.DrawImage and I hope someone will be able to give me some insight. I have a bitmap of variable (and considerable) size that need to be displayed in a resizable ...
Khurt's user avatar
  • 13
1 vote
0 answers
31 views

How can I overlay anti-aliased styled text on a Bitmap using Canvas in Android?

I'm building an Android app where I need to overlay styled text on images using Canvas and Paint. I’ve successfully drawn basic text, but I'm running into two main issues: Text appears jagged or ...
Salu Tech's user avatar
0 votes
0 answers
38 views

LargeIcon in a media notification appears extremely pixelated even though the bitmap/original album art is of good quality

When viewing my media notification the LargeIcon of the albumart is very pixelated. However Samsung Music's notification of the same albumart is of the correct resolution. I've attached 4 images below ...
Steve Campos's user avatar
0 votes
0 answers
51 views

How to randomize a white background on an image? [duplicate]

I'm not sure how to start this post, but I'll share the code I currently have. public class BitmapSubSection { public Bitmap BitmapSection; public BitmapSubSection(Bitmap incomingBitmap, ...
TheEmeraldEnd's user avatar
1 vote
1 answer
59 views

My Printer Macros Print documents on Some Printers and Silently Exit The Job on Others

I have been working on a printer macro that uses Python to paste a letterhead onto a PDF message and then send it to the printer to print. In most of the companies' offices I set it up in, it works ...
silverbrook4's user avatar
1 vote
1 answer
78 views

Border with an ItemsControl could not render properly as a Bitmap

My main goal is to simply print a Border that contains dynamic elements generated by an ItemsControl (via DataTemplates). The Border is hosted in a Canvas which in turn is hosted in a ScrollViewer. ...
Software Carpenter's user avatar
0 votes
1 answer
45 views

Loading a model but i get this error of bytes

private MappedByteBuffer loadModelFile() throws IOException { AssetFileDescriptor fileDescriptor = getAssets().openFd("model1.tflite"); FileInputStream inputStream = new ...
Moses Musire's user avatar
0 votes
0 answers
67 views

Is there a way to capture a bitmap view of a WPF window which is never shown?

For example I have a WPF window: public class MyWindow : Window { public MyWindow() { InitializeStyle(); InitializeContent(); InitializeSizePosition(); } // ......
Ace_Radom's user avatar
0 votes
0 answers
73 views

Fetch the Quality value from a jpeg Bitmap

I'm trying to get the quality value from a Bitmap which was loaded from a jpeg image. This is what I have so far: int GetQuality(Bitmap bitmap) { if (!bitmap.RawFormat.Equals(ImageFormat....
d ei's user avatar
  • 557
1 vote
0 answers
49 views

How to correctly calculate bfOffBits?

Embedded bitmap resources are missing BITMAPFILEHEADER ("correctly not returning the BITMAPFILEHEADER" according to Raymond Chen's article). Whether it is missing or correctly not returning, ...
yoonsoh's user avatar
  • 73
0 votes
0 answers
97 views

Range error on Delphi's TLogPalettepalPalEntry

I am attempting to convert RAW image data into a bitmap, however when populating the palPalEntry values I get a range error. Drilling down into the Winapi.Windows unit, I see the declaration is: ...
Stefan de Beer's user avatar
0 votes
0 answers
121 views

Display of a bitmap image, GetObject appears to incorrectly size some parameters in BITMAP structure

My question relates to a task I originally thought would be simple. I now find there are many details that were not first considered. My original goal was to draw an image of a flag in a dialog window....
Tom's user avatar
  • 79
0 votes
1 answer
495 views

Godot: how to get the displayed size of a Bitmap (TextureRect)

In Godot (V4), I have a TextureRect containing a 1000x500 Bitmap. I have put the TextureRect inside several different nodes (AspectContainer, MarginContainer, Control Node, etc), so I can resize the ...
John C's user avatar
  • 6,527
2 votes
0 answers
84 views

How to reuse bitmap when stretch-drawing it multiple times in to EMF?

I need to draw a large TBitmap32 to EMF many times. Every time bitmap is the same, but its offset and size can change. When drawn naively (case #1), it all works well, but the EMF size is enormous, ...
Kromster's user avatar
  • 7,510
0 votes
1 answer
75 views

Understanding this bit mask method

I saw an implementation of a bit mask in the following code, but I don't understand how it works. Can someone explain how the expression in the bit mask works? The author's comments are at the top of ...
BreenDeen's user avatar
  • 744
0 votes
1 answer
43 views

Do I need to call UnlockBits on a Bitmap that lives on stack?

I am using a Bitmap as a local variable that I manipulate and return. I am wondering if I should add a finally block with UnlockBits or leave the call without try finally block. { Bitmap bmp = new ...
meJustAndrew's user avatar
  • 6,759
0 votes
1 answer
157 views

Android Compose black color instead of erased transparent on bitmap

Im trying to achieve erasing pixel as transparent color on bitmap, Jetpack Compose. But when I load bitmap to show on canvas the erased pixels shown as black. Here my composable: @RequiresApi(Build....
samedhrmn's user avatar
  • 147
0 votes
2 answers
55 views

Android Compose PreviewView Bitmap is null, even if the preview is working

I am working on a specialized industrial device running Andoid 7.1 I want to make screenshots of the camera preview (to jpg) into the cache storage, when an event happens on the device (that event it ...
LGstudio's user avatar
  • 117
-1 votes
1 answer
207 views

Minimalist load and draw BMP file in Win32?

I'm looking for a minimalist way to load and draw a bitmap in the context of the WIN32 graphics interface. No GDI+, no extra libraries please. It looks like LoadBitmapA would be the right function to ...
Joymaker's user avatar
  • 1,624
0 votes
1 answer
56 views

MediaStore.Images.Media.getBitmap(getActivity().getContentResolver() always rotates vertical image to horizontal

In my app, I'm just trying to select multiple images from gallary and show in recyclerview before uploading into server. In recyclerview, the images appear with original orientation. However before ...
Naresh Pradhan's user avatar
0 votes
0 answers
54 views

WPF Saving really large control to bitmap results in partial image

I have a really large control that I want to save as a high-DPI TIFF image. The width is narrow, but the height of the control is the problem (it's usually inside a scroll view). The ActualHeight of ...
Vlad's user avatar
  • 1,937
0 votes
0 answers
61 views

How to export merge multi image to one page two sides (2 by 5) in A4 size output in VB.NET

I'm Trying to export merge multi image to one page two sides (2 by 5) in A4 size output in VB.NET. So the total image is 10 in 1 A4 page Please Guide Me Thanks Imports System.IO Public Class Form1 ...
dlaksmi's user avatar
  • 213
-1 votes
1 answer
62 views

WinUI3 BitmapEncoder.FlushAsync() hangs

I have the following code in my WinUI3 app: public class Screenshot(byte[] pixels, int width, int height) { public byte[] Pixels { get; } = pixels; public int Width { get; } = width; ...
Siyh's user avatar
  • 1,809
1 vote
1 answer
80 views

Why does the Bitmap constructor not retain the frame information?

Why does the Bitmap constructor not retain the frame information? In the example below using imagePath as a path to a 3 page tiff image, the first test works fine showing the different sizes of three ...
Arvo Bowen's user avatar
  • 4,968
0 votes
1 answer
38 views

How to Capture a Specific View as a Bitmap in Android?

I'm building an Android app in Kotlin, and I want to capture a particular View (like a TextView or ImageView) as a Bitmap. I’ve read that DrawingCache can help with this, but I’m unsure if it’s the ...
Lily Monta's user avatar
0 votes
2 answers
394 views

How to Share an Image Using a Bitmap with Intent in Android Kotlin?

I'm working on an Android app in Kotlin, and I need to share an image generated as a Bitmap to other apps (like social media or messaging apps). I want to use an Intent for this, but I’m unsure of the ...
Lily Monta's user avatar
0 votes
0 answers
34 views

Should I release bitmaps before deleting them?

After working with images, I'm very conscious of leaving unused objects laying around and not cleaning them up. With that said, I have a situation where I have a list of bitmap images and at a later ...
Arvo Bowen's user avatar
  • 4,968
0 votes
0 answers
41 views

Checking if bitmap previously saved before saving new image in android

For saving bitmap as files (png,jpeg etc) in filesDir as it received and adding the link in the room for later retrieving. How to avoid saving duplicate bitmap as png files when saving it in filesDir. ...
app's user avatar
  • 15
1 vote
1 answer
93 views

Is there a faster way to copy bitmap data when creating a new image?

I'm working on creating a new class to manipulate images and I just can't seem to get the speed I'm looking for out of it. I feel like calling g.DrawImage() is just taking longer than it should. When ...
Arvo Bowen's user avatar
  • 4,968
0 votes
1 answer
71 views

WinForm - pixel font not rendering correctly [closed]

I'm trying to use a pixel style font to write text on a bitmap in WinForm. The font I'm using is this: https://font.download/font/pocket-pixel. I want the text to be very small (6pt) and pixel perfect,...
IT_Marco_93's user avatar
0 votes
0 answers
51 views

Bitmap in Kotlin with Jetpack, won't draw the correct size

This has been driving me crazy all day. I have been trying to draw a full screen bitmap as the background for my custom view. The bitmap resolution is 2312x1080 the code right before I draw it shows ...
confused's user avatar
  • 761
3 votes
1 answer
1k views

How to get ImageBitmap from a Painter in Jetpack Compose?

I should use the Image() composable that takes image bitmap as its argument. How can I convert a Painter to ImageBitmap in Compose?
Mahozad's user avatar
  • 26.3k
0 votes
1 answer
42 views

Bitmap on Android ImageView not displaying as it should

I have two bitmaps that I have placed the character at the bottom right corner of the bitmap. However, I see that upon changing container height of the imageview whose android:src equals the bitmap, ...
i_o's user avatar
  • 799
1 vote
2 answers
47 views

Android: how to do a horizontal translation after a bitmap rotation?

I would like to draw a bitmap on a canvas with the method canvas.drawBitmap(bitmap, matrix, null), where I have to apply a transformation matrix to the bitmap. Let's have a bitmap with a width of ...
totoaussi's user avatar
  • 721
1 vote
1 answer
77 views

Bitshift in a bitmap calculation doesn't seem to work

I have a CLI chess program that takes in input from user(eg: 'e2e4') and converts it into two bitmaps i.e., s_map and e_map. The bitmaps are represented like 0x0000000000000000ULL; where the ...
Syntax Error12's user avatar
0 votes
2 answers
155 views

How can I retrieve the address of bitmaps in PROGMEM to show it on OLED display without using a switch..case construct?

I have a rather complex application which controls the number of cups of coffee that are drawn. After different numbers the water tank has to be filled or the coffee grounds has to be discarded. This ...
Harry S's user avatar
2 votes
1 answer
351 views

How to add Bitmaps to my project in Visual Studio Community (post Jun 2024 Update)

I have been developing a C# project for a few months now and using the resource manager to add bitmaps to my app. Before the June 2024 update (which introduced a new layout for the resource manager), ...
Thomas Agostinis's user avatar
-2 votes
1 answer
74 views

How to render a 3d model in a bitmap?

Is there any way in Android to render a 3D model in a Bitmap? Here's what I wanna achieve: load a 3D model; transform that 3D model (rotation and/or scale); set a light source (if possible), and; ...
Augusto Carmo's user avatar
0 votes
1 answer
74 views

how to merge two System.Windows.Controls.Image objects?

I have seen a lot of examples merging two System.Drawing.Image/Bitmap objects to create a single image, but I'm trying to do it with System.Windows.Controls.Image objects. For example, if I have the ...
user613832's user avatar
0 votes
1 answer
132 views

C# Winform ArgumentException was unhandled

I simply want to display the mouse position on a copy of the desktop. I have a form that is borderless, maximized and contains a PictureBox with DockStyle.Fill. In the form constructor I create a ...
Derek Johnson's user avatar
0 votes
0 answers
32 views

Picturebox does not display Bitmap image - remains white

From an IDS camera I do get an image which is shown in a picturebox (_display_Zoom0) which is working. Now I do have another picturebox (image_zoom1) where the same image shall be shown but cropped. ...
KD17's user avatar
  • 55
0 votes
1 answer
47 views

PNG image not getting converted from bitmap to png and downloaded to downloads directory

I was working on an app where i remove a portrait image's background (on-device) and download it upon being created. I have created the background removed bitmap of ARGB_8888 type and i was just about ...
Rudranil Bhattacharjee's user avatar
1 vote
0 answers
93 views

Crop Bitmap with an overlayview - ID Card Capture

I'm developing a feature to take picture of id card, I'm drawing a rectangle view on preview view in camerax so users can fit card inside and capture image. What I want is to crop the card inside the ...
Tuân's user avatar
  • 29
0 votes
1 answer
121 views

Freetype FT_Load_Glyph: expecting FT_GLYPH_FORMAT_BITMAP, getting FT_GLYPH_FORMAT_OUTLINE

This works as expected when built for x64 and running on the Windows desktop, but not as expected when built for UWP-arm64 and running on the HoloLens: After verifying that a selected face has a ...
Theodore Hall's user avatar
1 vote
1 answer
131 views

Problem using transparent PNGs for menu items in MFC

I was directed to an existing answer here: https://stackoverflow.com/a/60222653/2287576 But I am struggling to follow that code. This is what I have: CPngImage png; png.Load(IDB_PNG_MENU_REPORT, ...
Andrew Truckle's user avatar
1 vote
0 answers
131 views

Using BitBlt to capture a screenshot

I've been trying to create a .bmp file using functions like BitBlt, CreateCompatibleDC... in the kernel. The problem is whenever I run this code it creates a .bmp file successfully, the only issue is ...
trapstar's user avatar
0 votes
0 answers
78 views

ZEBRA EPL GW Command - Problem with bitmap to byte array conversion

I'm trying to make my Android JAVA app print using a GC420t zebra printer, everything related to the USB connection works just fine, but when it comes to printing i'm facing a problem when converting ...
Luis Beltrão's user avatar

1
2 3 4 5
314