png

How to save a png file with transparency?

折月煮酒 提交于 2019-12-30 09:39:46
问题 I am using Barcode Studio 2011 to paint a QR Code into a Graphics32 - TImage32 Component and I want to save it in png format but with the white colour as transparent this I have specified in the OuterColor of Graphics32. OnFormCreate I have just procedure TForm1.FormCreate(Sender: TObject); begin psBarcodeComponent1.BarCode := 'some text here...'; end; and for the moment I have the painting assigned to a Button Click Event procedure TForm1.Button8Click(Sender: TObject); // Paint the barcode

上传图片

妖精的绣舞 提交于 2019-12-29 21:00:03
// 允许上传的图片后缀 $allowedExts = array("gif", "jpeg", "jpg", "png"); $temp = explode(".", $_FILES["file"]["name"]); $temp1 = explode(".", $_FILES["file1"]["name"]); $temp2 = explode(".", $_FILES["file2"]["name"]); $temp3 = explode(".", $_FILES["file3"]["name"]); $temp4 = explode(".", $_FILES["file4"]["name"]); $temp5 = explode(".", $_FILES["file5"]["name"]); $extension = end($temp); // 获取文件后缀名 $extension1 = end($temp1); $extension2 = end($temp2); $extension3 = end($temp3); $extension4 = end($temp4); $extension5 = end($temp5); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"]

.9.png图片的生成和使用

别等时光非礼了梦想. 提交于 2019-12-29 18:04:28
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 开发应用程序的时候,如果一个应用的界面太丑,给用户的第一感觉就是这个产品很垃圾,即使功能很强悍。大公司的码农当然就不用担心了,因为有很多艺 术天赋的美工美眉来处理这个方面,但是如果是小公司的话,或者说你想自己开发应用的话,没有一个吸引人的界面是不会得到用户关注的。自己开发的应用如果看 着很喜爱,那当然再好不过了   废话有些多,了解.9.png图片已经一段时间了,索性将其记载下来,以防以后忘记。虽然网上有很多,但是很乱,看着心烦,而且不符合自己的需求,所以还是自己动手丰衣足食。   .9.png图片其实就是png格式图片,不过它比普通的png图片外围多了1px(像素)的边框,另外就是使用这种格式的图片可以实现背景自 适应大小且不失真的效果。比如某些控件横竖屏切换后控件的样子就变形了,或者某些图片作为控件背景也变形,这会让人很郁闷。幸好.9.png图片可以提供 这些需要的功能    使用步骤 1、 制作属于你自己的png图片,一定要是png图片。可以自己PS制作,也可以解压其他应用的apk文件,用里面的图片资源,Android系统也有图片资源可以使用() 2、 在D:\android\android-sdk-windows\tools目录下找到 draw9patch.bat 文件,然后将其打开

Transparent PNG over JPG in PHP

与世无争的帅哥 提交于 2019-12-29 08:52:13
问题 What seems to be simple, isn't :( I'm trying to add something like a watermark (transparent png) on an image (jpg). This is the code I'm using: $width = 800; $height = 600; $bottom_image = imagecreatefromjpeg("portrait1.jpg"); $top_image = imagecreatefrompng("man2.png"); imagesavealpha($top_image, true); imagealphablending($top_image, true); imagecopy($bottom_image, $top_image, 200, 200, 0, 0, $width, $height); header('Content-type: image/png'); imagepng($bottom_image); When I merge the

Transparent PNG over JPG in PHP

核能气质少年 提交于 2019-12-29 08:52:09
问题 What seems to be simple, isn't :( I'm trying to add something like a watermark (transparent png) on an image (jpg). This is the code I'm using: $width = 800; $height = 600; $bottom_image = imagecreatefromjpeg("portrait1.jpg"); $top_image = imagecreatefrompng("man2.png"); imagesavealpha($top_image, true); imagealphablending($top_image, true); imagecopy($bottom_image, $top_image, 200, 200, 0, 0, $width, $height); header('Content-type: image/png'); imagepng($bottom_image); When I merge the

PNG file format endianness?

安稳与你 提交于 2019-12-29 08:26:23
问题 Im not sure if endian is the right word but.. I have been parsing through a PNG file and I have noticed that all of the integer values are in big endian. Is this true? For example, the width and height are stored in the PNG file as 32bit unsigned integers. My image is 16x16 and in the file its stored as: 00 00 00 10 when it should be: 10 00 00 00 Is this true or is there something I am missing? 回答1: Yes, according to the specification, integers must be in network byte order (big endian): All

Is it possible to use .png images for WiX bitmaps

ⅰ亾dé卋堺 提交于 2019-12-29 07:34:09
问题 I am using 2 500K bitmaps in to display images on my WiX dialogs. They dramatically increase the size of the installation package, and what is worse - it looks there's no way to package them as a part of a .cab file since they're <binary> -es in the WiX terms. So, I thught, is there any way to use other file formats for bitmaps or WiX is tethered with BMP? Ideally it would be greate if there's a way to use .png format since it comes with a looseless compression option. 回答1: The Windows

Google Map V3 .png groundoverlay opacity

这一生的挚爱 提交于 2019-12-29 07:12:13
问题 I have created my first Google Map API with png overlays (thanks to @andresf for assistance). This map has multiple png ground overlays adjacent to each other and can be seen at http://www.earthstation.mobi/coverage.htm Question: How do I set the opacity (transparency?) on each overlay so that I can see the map detail under the overlay? I do not need to adjust this from the webpage, a preset coded into the script will suffice. The code of the page listed above is: <!DOCTYPE html "-//W3C//DTD

Convert Base64 to PNG/JPEG file in R

霸气de小男生 提交于 2019-12-29 07:09:27
问题 I have seen the process to convert a png file to base64 work in the post below Convert R image to Base 64 I would like to do the exact opposite of what you did. I have a base64 of a image stored in a variable "capimg" and now I want to convert it into a png or jpeg file. Can you help me reverse engineer the process. Is this doable? I have seen this done using php like below but I need a R script to do the same <?php $data = urldecode($_POST['imageData']); list($type, $data) = explode(';',

Using Chunks in a PNG

拥有回忆 提交于 2019-12-29 07:05:11
问题 I'm looking for a way to get and set those oddball chunks in a PNG file, namely in my case, the 'zTXt' chunk. Is there anything built into the .Net framework, or any other known assembly, that provides access this data? I'd like to avoid having to write an entire PNG reader/writer for this purpose if it has already been done. Thank you! Progress update: After more searching, there appears to be nothing pre-made for what I want to accomplish. I'm attempting to read through the file myself now,