6,780 questions
4
votes
1
answer
265
views
Producing a PNG with MiniZ
Inspired by the Wikipedia page on PNG, I am trying to produce my own little function for writing PNG.
I don't want to redo libPNG or spng, I just want a simple function for writing a PNG file, taking ...
0
votes
0
answers
29
views
Oxyplot png exporter causing application to hang when saving many plotmodels
I have an application that can produce and export potentially hundreds of PNG files from OxyPlot plotmodels. Usually, I am saving less than 100 PNGs. I one case I needed to save 264 PNGs and the ...
Tooling
0
votes
6
replies
90
views
Vectorization PNG image with precise color number
I have a task to convert user PNG image to SVG with maximum possible color number coming from user setting (e.g. 8). It means that i should make initially image created from 8 colors and then convert ...
0
votes
0
answers
43
views
Using image background sticked to a map in Highcharts
I use Highcahrts to display data on specific geojson maps. Sometimes, the maps are not "geographical" but represent a plan (plant, boat...). I want to be able to add a PNG image on the ...
3
votes
2
answers
129
views
How to generate scatter plot of all numeric columns against specific columns in the same dataframe
I have a dataframe with a mix of data types (object and numeric). I want to plot a scatter plot for all numeric columns in the dataset against specific columns: col_32, col_69,col_74 and col_80 ...
1
vote
1
answer
79
views
When Altair saves plot with save, it loses some configuration parameters
I made a heatmap with Altair with wide borders between the cells, in Jupyter notebook.
When I print it in notebook it looks like it is supposed to - with wide borders,
However when I save it as png, ...
0
votes
1
answer
69
views
Adding transparency layer to image png::readPNG grDevices::rgb [closed]
I'm using the following code to add an image to a ggplot object and set the alpha (transparency) to 0.5
add_BGimg <- function(bg_image_in, res, ggplot_in){
im <- png::readPNG(...
0
votes
2
answers
205
views
png vs. webp : Which resources do I need which can I delete?
I was trying to build a new app on Android and got a whole bunch of errors like the following:
[mipmap-hdpi-v4/ic_launcher] C:\code\mmm\android\app\src\main\res\mipmap-hdpi\ic_launcher.png
[mipmap-...
2
votes
1
answer
139
views
Zlib Inflate Error (-5)(Z_BUF_ERROR) While Loading PNG – avail_in = 0 Unexpectedly [closed]
I'm working on a school project and I'm trying to load PNG files without using additional libraries (so no libpng, just zlib and my own parsing). Everything works fine with most PNGs, except for one ...
1
vote
1
answer
70
views
Transparency and inverted colorbox produce inconsistent colors on gnuplot
I'm encountering a strange issue in gnuplot when combining transparency with an inverted colorbox.
The colors shown in the colorbox do not match the colors actually used in the plot. Additionally, in ...
0
votes
0
answers
80
views
Why is the embedded image extracted from pypdf of lower resolution than when i used pdf2image to conver the entire pdf page?
I have a pdf document which I want to extract embedded images to be used.
I used the code below which to extract the embedded images from the first page of the pdf document:
from pypdf import ...
0
votes
2
answers
156
views
base64 encoded image not showing in Firefox, but works in Safari
Consider the following MWE:
<html><body>
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAEAAQAACAYAAAAY4xeyAAAFBUlEQVR4nO3TsQ0DAQwDMSX77+...
2
votes
1
answer
180
views
How do I use the python support in DigitalMicrograph to save a color image as PNG file
I can use the python functionality to save a DM image into PNG, as long as it is NOT RGB data type. Here is the code for doing so:
import tkinter as tk
from tkinter import filedialog
from skimage ...
1
vote
1
answer
109
views
In Python Wand, how can I take the convex_hull() of an image only if it has a transparent background?
I am trying to pack images. For PNGs, a transparent background can be neglected - I can take the boundary of the image as a polygon defined from the output of a call to wand.image.convex_hull().
...
0
votes
1
answer
52
views
nginx with createObjectURL and binary png data appears to serve the file as text with utf8 encoding
We have some swagger-ui.js code generating a download link to a png image delivered from a REST API call. The download link is generated by the swagger-ui.js code:
var binaryData = [];
binaryData.push(...
-1
votes
1
answer
57
views
When converting a PSD to a PNG, the black border shadow disappears using ImageMagick [closed]
When converting a PSD to a PNG, the black border shadow disappears using ImageMagick
Original Image:
After converting losing black border shadow using imageMagick:
When converting a PSD to a PNG, the ...
1
vote
2
answers
156
views
How do I unittest an HTML page that contains an embedded dynamic image?
I've got an dynamic HTML page that contains a QR code that is generated dynamically and embedded using <img src=data:image/png:....>. I had been testing the page by generating it with specific ...
1
vote
2
answers
228
views
Reducing margins when exporting terra plot to png
I would like to export a terra plot to png and I need the exported figure to be almost perfectly clipped around the raster that is being plotted and the related legend.
However, if I run a default ...
1
vote
0
answers
53
views
ggplot2 & ggsave - Symbol doesn't save in png [duplicate]
I'm trying to make a panel in a plot that shows the R squared value of the correlation in another panel. When I create the plot, it shows up fine in RStudio, but when I save to PNG, the colon symbol ...
0
votes
1
answer
45
views
What would happen if I store signed values in a PNG with the opposite byte order?
Aside from the image not being properly represented in something like an image editor, if my goal is to simply compress the pixels, and then retrieve them by decoding and reading them as I wrote them, ...
1
vote
0
answers
97
views
How do I Change the metadata of a PNG image with an alpha channel
I'm building an C# console-app that modifies image metadata (title, comments, tags) with AI-generated text to improve searchability in file folders. However, I recently ran into a problem. Is it not ...
0
votes
1
answer
171
views
Plotly graph object not exporting as png in Streamlit app
I am trying to export my plotly graph object to a png in my Streamlit app, I am running my Streamlit app locally using: python -m streamlit run Streamlit_Mapping.py
The code I am referring to looks ...
1
vote
1
answer
44
views
Why are the colors mixed up in this screenshot taken using Robot.js?
I'm using Robot.js to take screenshots (I don't really want to install any other heavy packages over 1 mb, but I'm already using Robot.js and no, Jimp isn't what I'm looking for). Since the ...
0
votes
1
answer
106
views
Issue with saving predefined chart as PNG using pygwalker in Spyder
I’ve created a chart using pygwalker in a Jupyter Notebook:
...
visuals = pyg.walk(df, spec='pygwalker_spec_123456789.json')
visuals.chart_list
Output: ['Chart 1']
What I would like to do is save ...
0
votes
1
answer
89
views
Invalid length codes in DEFLATE format during PNG decoding
For learning purposes I try to implement PNG/zlib/DEFLATE decoding.
From scratch, according to original specs.
At this moment I'm stuck at decoding this 2x2 image:
<- its here.
Specifically, at ...
0
votes
1
answer
192
views
How to convert multiple postscript files into PNGs using Ghostscript
I will be processing hundreds of postscript files and converting them into PNG files with Ghostscript, so I am trying to find a way to batch process them in one command.
When doing this manually I ...
1
vote
1
answer
167
views
Convert a PDF to a PNG with transparency
My goal is to obtain a PNG file with a transparent background from a PDF file.
The convert tool can do the job:
$ convert test.pdf test.png
$ file test.png
test.png: PNG image data, 595 x 842, 8-bit ...
0
votes
1
answer
65
views
How to move a chart to a specific X and Y point in your CANVAS in Kotlin?
The following code takes a linechart view, turns into an PNG image and saves it on the phone. However, I want to adjust vertical or Top location of the linechart on the canvas. No matter what I try, ...
0
votes
0
answers
141
views
Can't get Image on Canvas to display image with transparent sections
I have an image (stored as a PNG) that has some transparent areas that I'm loading into a System.Drawing.Bitmap. I've confirmed image.PixelFormat is Format32bppArgb and that the image does indeed ...
-1
votes
1
answer
199
views
Convert .png segment of HLS to mp3
I have url of HLS:
https://9str-m3u8-play-021024.playm4u.xyz/m3u8/tp1-rdv1/1080/642bce856edd7cab511931a2/647af249adaf446b461a374e/53616c7465645f5f3ec139a78aff102a8e3a3c62ae8f3826f32bf6f19ea4b1fb/...
0
votes
1
answer
55
views
Resize image held in variable while preserving aspect ratio using PHP
There are tons of answers here in SO and elsewhere on the web about how to resize an image using PHP when the image is on disk. However, these do not work if the image is held in a variable. I believe ...
0
votes
0
answers
103
views
Converting a .PNG file from a Buffer in C++ to RGB Hex
I am reading a PNG file from a website:
String zoom = "5"; // Test Values
String xmap = "30"; // Need to be adjusted
String ymap = "30";
String ...
3
votes
2
answers
257
views
Why are images zoomed in browsers, and how to circumvent this issue?
Why aren't these images crispy on site (online)? Why are they zoomed in?
Online:
These also should look crispy, but they are zoomed in:
Here's the comparison:
On the right side of this screenshot, ...
1
vote
0
answers
79
views
is there a limit (data, resolution, or some other parameter) in png devices in R
I am using the biosurvey package trying to run a function (biosurvey::explore_data_EG) that plots 4 panels, which specifically for me are 2 large map rasters at 1km resolution for Canada, 1 biplot ...
2
votes
0
answers
1k
views
Error loading webview: Error: Could not register service worker: InvalidStateError
When I try to open .png file or any python file that has text in it, I get:
Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The ...
0
votes
1
answer
197
views
Writing a png image from scratch in C++ after compression via zlib
My goal is to write a png image from a starting bitmap image. I know the existence of many libraries, but I need to write it from scratch.
The first function I have implemented is "...
1
vote
3
answers
195
views
How do I save the PNG image of a barcode generated from a Guid?
I'm working on an API that, in a specific step, will generate a barcode from a Guid and save said barcode as a PNG image to my local machine. I'm using the barcodelib library to try and accomplish ...
0
votes
1
answer
106
views
wxmaxima wxdraw , wxdraw2d, wxdraw3d. How to change output to a *.png file instead of terminal computer screen
I have successfully changed the output from default terminal screen to a *.png by for example.
[load(implicit_plot),
gnuplot_out_file[png,"gnu.png"],
implicit_plot(x^2+y^2-1,[x,-1,1],[y,...
4
votes
2
answers
239
views
How to export plots from R without margins and without manually specifying width and height?
I'm creating several plots in R with differing aspect ratios that are intended for use in Latex later.
I have plots similar to this:
library(ggplot2)
library(sf)
map <- st_sf(geometry = st_sfc(...
1
vote
1
answer
78
views
Can you save a pdf/jpg/png as an object and arrange in a single plot?
I know how to save a plot as a pdf to disk ...
pdf(file = "sample.pdf")
plot(x=1:2,y=1:2)
dev.off()
But, instead of sample.pdf could I make the pdf an object in the global environment? I ...
0
votes
1
answer
110
views
Why graphviz/dot does not generate the exact same binary when using the exact same input
I'm generating a graph png file from this input architecture.graph.txt:
digraph GG { node [ fontsize="12"];
compound=true;
subgraph cluster_general_purpose_utilities {
label="...
0
votes
2
answers
135
views
Drawing rectangle in PNG file
TLDR: My goal is simple. I have a PNG file. I want to draw a rectangle in it using Python and save it to a new file.
I have a PNG file (attached to this post). All I want to do is draw a rectangle in ...
1
vote
2
answers
261
views
What function does `CreateIconFromResourceEx()` use to decompress PNG resources?
Icons in .dll or .exe files are stored in the resources segment as Windows DIBs or PNGs since Windows Vista.
What function/library is used by the CreateIconFromResourceEx() WinAPI function in the ...
0
votes
1
answer
91
views
Reading PNG data regarding
I am trying to read PNG data with libpng, but I am not able to figure out the last step.
I am trying to read png pixel data. Here is what I came up with
#include <png.h>
#include <pngconf.h&...
2
votes
0
answers
97
views
Colors changed after JPEG to PNG conversion using PIL
My Lambda function uses the Python Image Library (PIL) to convert images, specifically converting everything to PNG. Recently, I've run into a few cases where the colors of the image noticeably change ...
0
votes
1
answer
67
views
Invalid BTYPE value in png parsing (zlib/deflate)
I'm trying to parse a png file but I seem to be missing something.
My test image was the following: https://www.w3.org/Graphics/PNG/alphatest.png
When parsing the file my BTYPE value (https://www.ietf....
1
vote
2
answers
357
views
How can I run an Irfanview batch script in a for loop inside a .bat file?
I'm trying to write a .bat file that will
extract all .cbz archive files in current directory
convert all jpgs in the resulting directories into pngs with a max width/height of 750/560, by using an ...
2
votes
1
answer
116
views
get size of PNG from bytes
I am trying to extract the size of an PNG image from a datastream
Consider the starting data of the stream
137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 2 84 0 0 3 74 8 2 0 0 0 195 81 71 33 0 0 0 ....
1
vote
1
answer
189
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, ...
0
votes
0
answers
152
views
Generic GDI+ error building in VS2019, or when saving as PNG (works with JPEG)
I installed Windows 11 and Visual Studio 2019 Professional to build our application, but the build always fails with a "Generic GDI+ error" when compiling the resources. If I remove the PNG ...