png

Hi-res PNG file in ipad's safari

痞子三分冷 提交于 2019-12-21 04:33:07
问题 I have some asp.net site that shows png images that converted from hi-res tiff files. The image is shown via simple img tag. The problem is that wneh png has a big resolution - it does not shown properly in ipad's safari browser, but the most of png files are ok. What it can be? Thank you 回答1: The iPad cannot display images with a w*h larger than 3*1024*1024 (3145728) So if your image is 2048x2048 then w*h = 4194304 which is larger than 3145728. Source: https://developer.apple.com/library

How to load a transparent Image from ImageList?

本秂侑毒 提交于 2019-12-21 03:54:15
问题 I want to load a picture (32 bit-depth, transparent) from a TImageList to an TImage . The standard approach would be ImageList.GetBitmap(Index, Image.Picture.Bitmap); . However the GetBitmap method doesn't work with transparency, so I always get a non-transparent bitmap. 回答1: The workaround is rather simple - ImageList offers another method, GetIcon , which works OK with transparency. Code to load a transparent Image would be: ImageList.GetIcon(Index, Image.Picture.Icon); And don't forget to

Obey the MediaBox/CropBox in PDF when using Ghostscript to render a PDF to a PNG

删除回忆录丶 提交于 2019-12-21 03:54:14
问题 I've been using Ghostscript to convert my single figure plots rendered in PDF to PNG: gswin32c -sDEVICE=png16m -r300x300 -sOutputFile=junk.png ^ -dBATCH -dNOPAUSE Figure_001-a.pdf This works in the sense I get a PNG out and it contains the plot. But it contains a huge amount of white space as well (an example source image: http://cdsweb.cern.ch/record/1258681/files/Figure_001-a.pdf). If you view it in Acrobat you'll note there is no white space around the plot. If you use the above command

How can I convert a JPEG image to a PNG one with transparent background?

我只是一个虾纸丫 提交于 2019-12-21 02:45:19
问题 I have a JPEG format image, with a white background and a black circle. How can I transform this image to a PNG format that the white background will be transparent and the black remains there? I'm a programmer too, and if there are some ideas in C# code I will be very happy. Also I'm looking for a converter, tool, program anything. Thank you. Jeff 回答1: Here is working, but slow solution. You can speed it up by using Bitmap.LockBits(). using (Image img = Image.FromFile(filename)) using

Problem about Background transparent .png format OpenCV with Python

▼魔方 西西 提交于 2019-12-21 02:43:13
问题 I'm studying on OpenCV with Python. I tried to change a color of picture in PNG format, but I have got some problem with PNG background (The image has transparent background). When I change it to grayscale, the background has changed to black -- my picture is not transparent anymore. What I desire is to keep the transparent background of picture. Original image: My code: img = cv2.imread('line.png',cv2.IMREAD_UNCHANGED) cv2.imshow('line',img) cv2.waitKey() Output image: Desired output: The

img标签间距问题

╄→гoц情女王★ 提交于 2019-12-21 01:54:23
关于img标签间距问题:多个img之间有间距,包含img标签的div之间有间距。 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>test</title> 6 <link rel="stylesheet" type="text/css" href="css/test.css"> 7 </head> 8 <body> 9 <div> 10 <img src="images/1.png"> 11 <img src="images/2.png"> 12 <img src="images/3.png"> 13 </div> 14 <div> 15 <img src="images/4.png"> 16 <img src="images/5.png"> 17 <img src="images/6.png"> 18 </div> 19 <div> 20 <img src="images/7.png"> 21 <img src="images/8.png"> 22 <img src="images/9.png"> 23 </div> 24 </body> 25 </html> 谷歌浏览器效果: 火狐浏览器效果:   我们发现,不同div之间,上下有空白间隙,不同img之间,左右有间隙,而且

GIF/PNG/JPG和WEBP/base64/apng图片优点和缺点整理

有些话、适合烂在心里 提交于 2019-12-20 18:16:34
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>   GIF / PNG /JPG/ WEBP / APNG 都是属于 位图 (位图 ,务必区别于 矢量图 );  GIF/PNG和JPG这三种格式的图片被广泛应用在现今的互联网中,gif曾在过去互联网初期慢速的情况下几乎是做到了大一统的地位,而现如今随着互联网技术应用和硬件条件的提高, png 和jpg格式的图片越来越多的被应用,gif昔日的辉煌一去不复, webp 图片格式现在还不普及: GIF(Graphics Interchange Format)   GIF 图形交换格式 是一种位图图形文件格式,以8位色(即256种颜色)重现真彩色的图像。 它实际上是一种压缩文档, 采用LZW压缩算法进行编码,有效地减少了图像文件在网络上传输的时间。它是目前广泛应用于网络传输的图像格式之一。 优点   1. 优秀的压缩算法使其在一定程度上保证图像质量的同时将体积变得很小。   2. 可插入多帧,从而实现动画效果。   3. 可设置透明色以产生对象浮现于背景之上的效果。 缺点   由于采用了8位压缩,最多只能处理256种颜色(2的8次方),故不宜应用于真彩图像。 PNG(Portable Network Graphics)   便携式网络图片(Portable Network Graphics),简称PNG

default camera to take a picture in android

不想你离开。 提交于 2019-12-20 15:27:54
问题 How to use default camera to take a picture in android ? 回答1: Uri imageUri; final int TAKE_PICTURE = 115; public void capturePhoto(View view) { Intent intent = new Intent("android.media.action.IMAGE_CAPTURE"); File photoFile = new File(Environment.getExternalStorageDirectory(), "Photo.png"); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile)); imageUri = Uri.fromFile(photoFile); startActivityForResult(intent, TAKE_PICTURE); } @Override public void onActivityResult(int

Using png or svg image as graphviz node

拟墨画扇 提交于 2019-12-20 12:46:35
问题 I've tried to use a custom image node in graphviz (node d ): digraph foo { rankdir=LR; node [shape=record]; a [label="{ <data> 12 | <ref> }", width=1.2] b [label="{ <data> 99 | <ref> }"]; c [label="{ <data> 37 | <ref> }"]; d [image="X_Shape_Pillar_Yellow.png"]; a:ref:c -> b:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false, arrowsize=1.2]; b:ref:c -> c:data [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false]; c:ref:c -> d [arrowhead=vee, arrowtail=dot, dir=both, tailclip=false

Just in theory: How is the alpha component premultiplied into the other components of an PNG in iPhone OS, and how can it be unpremultiplied properly?

荒凉一梦 提交于 2019-12-20 10:57:36
问题 Actually, I thought that there would be an easy way to achieve that. What I need is pure alpha value information. For testing, I have a 50 x 55 px PNG, where on every edge a 5x5 pixel rectangle is fully transparent. In these areas alpha has to be 0.Everywhere else it has to be 255. I made very sure that my PNG is created correctly, and it also looks correctly. Please tell me if this is theoretically correct: I created an CGImageRef that has only the alpha channel and nothing else. This is