Questions tagged [png]
PNG (Portable Network Graphics) is an image file format designed to store raster graphics. It is associated with ".png" file extension. Use this tag for questions involving this specific format.
6,697
questions
1
vote
1
answer
24
views
Converting a SVG to a PNG for download
I have a basic static site which utilizes the free JointJS library to draw interactive diagrams.
The JointJS library seems to draw the diagrams as SVG, and I'm able to successfully export them as SVG ...
1
vote
1
answer
12
views
Is it possible to load .png files into DigitalMicrograph directly
Has anyone been successful in loading .png files directly into DM? I used the menu item 'Import Data..." and know the image size in pixels and tried all combinations but did not succeed. Any ...
0
votes
1
answer
27
views
Learning IDAT in detail
I have a broken png file where compression CMF is 0x28 and FLG is 0xB5 in the IDAT chunk. As far as i know it shouldn't be a valid IDAT header. Can anyone tell me if this CMF and FLG byte is valid?If ...
0
votes
0
answers
12
views
RuntimeError: Can not find Ghostscript library (libgs)
The problem I'm facing is the same as this one, but I'm on Windows. And using vs code. I've been trying to convert a postscript .eps file to an image .png. (Using pillow and turtle). That returned ...
3
votes
2
answers
29
views
To delete a transparent area of an image in Python
I want to use Python to cut the transparent area of the image file.
Please look at the picture below.
image 1 (original image)
image 2 (result image)
The original image has alternating opaque and ...
-1
votes
3
answers
35
views
What happens if I change a PNG file to a ZIP file and try to open it in Windows? [closed]
What happens if I change a random file into a .zip file and try to open it? Will anything bad happen?
Imagine that I take a .png file, and change the file extension to .zip. Will attempting to open or ...
0
votes
2
answers
24
views
How can i make the splashscreen cover 100% for React native Expo?
How do i make this splashscreen to cover very well? I do not know why it just covers some place and does not cover some places. I am using react native expo.
My App.JS is looking thus
import { ...
0
votes
1
answer
31
views
Manipulating image/gif files and their .bin or .dat representations, and then converting them back to image/gif representation
I'm trying to play around with Python and image/gif files and their .bin or .dat representations. For instance, I want to take a PNG file, convert it to its .bin or .dat file (its binary version), and ...
-1
votes
0
answers
23
views
save folium as png install fitz
I am trying to save a folium map object as a png to place into a powerpoint.
I looked at suggestions here Is it possible to save a folium object in Python? and Export a folium map as a png, but keep ...
-1
votes
0
answers
29
views
React Native | FFMPEG on iOS | Adding PNG image overlay "watermark" on a video, JPEG is working, but PNG is not working
Struggled for five hours so wanted to show people using react-native ffmpeg libraries how to do this.
You need to disable PNG compression in your build settings on XCode.
Follow the description here, ...
-1
votes
0
answers
21
views
What's with the change of font color in my absolute path mean? [duplicate]
So I'm trying to create an mp3 player using Python (feat. tkinter and pygame libraries).
As I'm defining my Player Control Buttons, the font color in my absolute path changes briefly (lines 17 & ...
0
votes
0
answers
37
views
Using P5.js, how can you change Pixel values of a .PNG file?
I am writing a game in Javascript using P5.js, and the sprites I created are from .png files. They were created in black. Is there a way to recolor the images to another color? Does anyone have any ...
1
vote
1
answer
33
views
How to Save Figure as PNG Byte Array With Decimal Formatting
I have some data I'm visualizing with a MatPlotLib figure. I want to be able to convert the figure into a byte array that is formatted with PNG decimal values.
https://www.w3.org/TR/PNG-Structure.html
...
0
votes
0
answers
16
views
Warnings on arm64 when using tf.keras.preprocessing.image_dataset_from_directory() with color_mode="rgb" on grayscale images for transfer learning
I want to perform transfer learning with a pre-trained model that expects 3-channel input images such as VGG-16, but my images are grayscale. I am using tf.keras.preprocessing....
0
votes
0
answers
36
views
Slideshow with PHP
I need to create a php code to show a media gallery, in which each image is shown for some seconds. In particular, the images can be PNG or GIF, and in the second case I need it to show the animation. ...
1
vote
1
answer
87
views
Malformed PNG pixel data from deflate "unknown edge cases"
For the past 2 months, I've been implementing a png/deflate decoder, (for various reasons but mainly for learning purposes) but only returns the correct expected data in some cases.
Here in this table,...
1
vote
0
answers
41
views
Not able to convert images saved in html format to png format
I am generating Lime plots and saving them into .html format which are later converted into .png for further processing. Saving Lime plots directly into .png format are saving the blank png files. I ...
-1
votes
1
answer
35
views
The html file doesn't show the png image
I sourced the image on VS code and when I previewed the code I can see the image, however when I open the html file the image is broken.
<img src="./birthday project screenshot.png" ...
0
votes
0
answers
14
views
PNG compression using WuQuantizer not woring
I use following code to compress png.
Bitmap bmp1;
using (var webClient = new WebClient())
{
byte[] imageData = webClient.DownloadData(...
1
vote
1
answer
56
views
Python to convert data to a png file
We have an intranet/knowledge base site that has an API. I can use that API to pull assets from the backend. That worked as expected... except... I'm not sure what format the return is in. The file is ...
-1
votes
1
answer
25
views
Instagram symbol don't change color when hoover it, the problem is the format?
My HTML code:
<header>
<div class="logo">
<img src="imagens/mascote.png" alt="" />
</div>
<...
0
votes
1
answer
23
views
how to save the Binary image data to a image file
I am using node js and made a REST API call to retrieve an image file from a remote server, the call completed, and some data was returned.
'�PNG
���
IHDR��(������-��biCCPICC Profile��(�m��K�`Ɵh��g)B�...
0
votes
1
answer
28
views
White pixel artifacts on borders when copying image using C# graphics
I have some PNG image which looks in Windows Photos like this (it has transparent background)
, scaled:
When I import this in Unity it looks like that:
, scaled:
As you can see there are already ...
0
votes
1
answer
66
views
Unity Transparent Background Shows As Black
The png in my game's transparent background shows up as black in unity, anyone know what to do?
I expected it to be a tranparent background but it's not so any help is appreciated.
1
vote
1
answer
103
views
How to decode a PNG image in a PDF file?
I was building a tool to extract images in a PDF file using Rust. For now I can extract all other images except PNG.
I used a crate called pdf to extract the images.
let mut images: Vec<_> = vec!...
0
votes
0
answers
50
views
System.Drawing,Common - Parameter is not Valid when saving generated QR Code
I'm trying to create a function that generates a qr code based on the url parameters and display it on screen.
Error details:
System.ArgumentException
HResult=0x80070057
Message=Parameter is not ...
1
vote
1
answer
82
views
How do display .avif images in not supporting browsers?
i want to all my big .png files to .avif . But Browsers like MS Edge etc. do not support .avif images. Is there any way to display .avif files in f.e. Edge, or provide the Browser two images (.png and ...
0
votes
0
answers
26
views
document.createElement("img") conversion to jQuery
I am finishing my first project, blackjack game, and I need to convert window and document objects to corresponding jQuery. I've figured out most of them with an exception of document.createElement(&...
0
votes
0
answers
36
views
Strapi issue when uploading image to Media Library
I'm trying to upload a simple .png format image to the Media Library throw Strapi Dashboard.
The issue is after the image is successfully uploaded, It has some wired holes init.
If anyone has an idea ...
2
votes
1
answer
53
views
W3Schools example of PNG clipping Mask in CSS doesn't work locally
I copy and paste this code example from W3Schools into a HTML file on my local computer.
I also put the required image files in that folder. See the screen shot below for how it renders.
The mask ...
1
vote
1
answer
47
views
Incomplete video when using ffmpeg to weave WAV and PNG
I am trying to "weave" PNG image files with a WAV file. Here is the ffmpeg command that I used:
'/opt/homebrew/Cellar/ffmpeg/5.1.2_6/bin/ffmpeg' -y -f concat -safe 0 -i '/private/var/folders/...
0
votes
0
answers
22
views
Cannot find image that is saved locally on Android - Flutter
I am currently trying to save a png to a local directory on an Android device using flutter. This code works on iOS but doesn't work on Android. I have added the following permissions to the Android ...
0
votes
0
answers
44
views
Unknown file extension ".png" in React
I have a React project (created with create-react-app).
In my project folder, I have png images. When I try to import them into my .js file like this..
import wateringCan from './imgs/wateringCan.png'
...
0
votes
1
answer
28
views
What is four bytes in png after each section
I'm trying to figure out the PNG format using the following image as an example:
A different PNG image's hex representation looks like this:
Between the sections IHDR-sRGB (0f d8 e5 b7 00 00 00 01) ...
1
vote
1
answer
68
views
How to save a LateX rendered image (via Latexify) to disk in png in Julia
I am using Julia.
I used Latexitfy to generate an image from a model equations using the following code:
Latexify.latexify(model_equations) |> render
Now I'd like to export that image generated to ...
-1
votes
1
answer
25
views
how to save an visualisation as a png
Please advise how to save an image in png using a script and set a max extension
chord_data <- data %>%
select(from, to = to, value = value) %>%
as.data.frame()
tmp <- chordDiagram(...
0
votes
1
answer
81
views
Why .png and other types of images aren't loading on my browser?
I'm facing a very technical issue which is very frustrating, the images in the websites are not loading, instead of image I can only see a square pattern, I'm giving some of the screenshots below.
I ...
0
votes
0
answers
73
views
is it possible to convert bmp to png in python using only windows resources not PIL or pillow?
Here's what I have so far but I keep running into errors
import win32com.client
def bmp_to_png_winapi(bmp_filepath, png_filepath):
shimgvw = win32com.client.Dispatch("WIA.ImageFile")
...
0
votes
0
answers
20
views
Why are my pngs not saving in a loop in R? [duplicate]
I want to produce a number of .png files in a loop in R. I wrote the code and checked that the ggplot commands created and saved the .png file when I ran it for just one image.
When I executed the ...
1
vote
0
answers
22
views
PNG conversion with viridis color chart error
I created a script where I have a working directory with several png images with a greyscale map in it. I want to convert the greyscale color chart to a viridis color chart to show to occurrences of ...
0
votes
0
answers
21
views
.png not being properly created from plot
I have several tif files created with Rstudio from species occurrence maps. Because I want to use these files as a proper image of the occurrences on a map, I have to convert my tif files to a png.
I ...
0
votes
1
answer
39
views
How to convert undefined/propriatary file with ImageMagick?
I am trying to execute this command on MacOS:
convert -depth 16 -size 210x274 SCRSHOT5 \( -clone -evaluate RightShift 11 -evaluate And 31 -evaluate LeftShift 11 \) \( -clone 0 -evaluate RightShift 5 -...
0
votes
0
answers
58
views
Vector drawable's path is too long - Bad for performance. Does using same image as PNG help to solve performance issues?
I used Android Studio's built-in Vector Asset tool to convert SVG image to Vector drawable. When I open created xml file I see that pathData is very long and lint is highlighting it with following ...
0
votes
1
answer
21
views
Matplotlib axis not appearing in saved images
I'll submit this question only because I couldn't find any similar questions.
Today I was making plots using Python 3.10.4, matplotlib 3.5.2
I used matplotlib.pyplot.savefig(f"[ImageSpecificName{...
2
votes
1
answer
73
views
How does the IDAT block of a PNG image store pixel information?
This is my Python code:
import struct
import zlib
PNG_HEADER = b'\x89\x50\x4e\x47\x0d\x0a\x1a\x0a'
IHDR = b'\x00\x00\x00\x0d\x49\x48\x44\x52\x00\x00\x00\x02\x00\x00\x00\x02\x08\x02\x00\x00\x00'
IHDR +...
0
votes
1
answer
34
views
Transparency not preserved after applying imagecopyresampled
I have a question related to the GD library on PHP. I can't add a transparent image to the canvas in a way that preserves the transparency.
Here is the output that I get
Here is the code that I used
$...
0
votes
2
answers
208
views
How to reduce file size of png image in Swift by reducing resolution
I'm looking for ways to reduce the file size of a PNG file via an image resize, not further compression.
There is a lot of sample code here that compresses a UIImage by turning it into a JPEG.
Like ...
0
votes
0
answers
26
views
How do I extract only the 16x16px size from a Windows ICO using Imagemagick?
This is the string I'm using now:
magick convert -set filename:f "%t_%wpx" "ICO:myicon.ico[0]" %[filename:f].png
This operation does work some of the time, but there are several ...
0
votes
0
answers
82
views
Is there an easy way to remove black background from the PNG?
I have a PNG image:
I need to remove the black corners and make them transparent.
I have found a way to do it. What it does:
Create a canvas, then edit the PNG pixel by pixel and change totally black ...
0
votes
0
answers
37
views
Not able to save kable extra table as png in R
I have this code in R Markdown and I'd like to be able to export my kable extra table to .png to add it to my word document (knitting as word file does not work), but this option to save as pdf or png ...