png

Configuring PNG on ImageMagick on a Linux Server

Deadly 提交于 2020-01-14 13:11:53
问题 I have been trying to run the following script on ImageMagick on a Linux server convert resized.png -gravity Center -crop 1024X768+0+0 +repage flower.png but have been hitting the following error: convert: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/501. convert: no images defined `flower.png' @ error/convert.c/ConvertImageCommand/3212. It looks like there is no delegate for PNG. When I run: identify -version I get this result that shows that the PNG delegate

【python】将普通图像(PNG)转换为MNIST数据集格式(idx1-ubyte)

杀马特。学长 韩版系。学妹 提交于 2020-01-14 11:40:58
源代码:https://github.com/gskielian/JPG-PNG-to-MNIST-NN-Format 网络上关于深度学习的源实例代码都是基于MNIST手写字体数据集的,该数据集格式比较特殊,若想应用于自己的数据应该怎么转换呢? 在github上找到了大神编的代码,整个文件如下: 原始图像分别放到train-images和test-images文件夹中,注意默认格式为PNG,若是JPG要修改代码,而且图像要按照标签存放,数字标签要从1开始 同时,batches.meta.txt存放对应标签。 resize-script.sh文件用于改变图像尺寸,统一为28*28 修改convert-image-to-mnist-format.py图像文件路径即可成功实现图像格式的转换,生成 来源: https://www.cnblogs.com/aodu/p/9487414.html

How to make screenshot for block with svg elements on the site?

痴心易碎 提交于 2020-01-14 04:43:08
问题 I created a constructor on the site whose essence is that it adds the selected elements and their colors (elements in svg) to the background and background color chosen by the visitor (the background in png), and then you must click on the "save result" button and execute screenshot of the workspace only. I wrote this script, BUT it takes a screenshot, but only the background, and ignores selected and installed svg (they are not on the screenshot - just the background), I have some ideas why,

How to make screenshot for block with svg elements on the site?

梦想与她 提交于 2020-01-14 04:43:06
问题 I created a constructor on the site whose essence is that it adds the selected elements and their colors (elements in svg) to the background and background color chosen by the visitor (the background in png), and then you must click on the "save result" button and execute screenshot of the workspace only. I wrote this script, BUT it takes a screenshot, but only the background, and ignores selected and installed svg (they are not on the screenshot - just the background), I have some ideas why,

How to convert PNG to GIF using javascript or other client-side tech?

天涯浪子 提交于 2020-01-14 02:34:13
问题 I have a combination of client-side technologies creating PNG data in the browser. Is there a way to convert the PNG data to GIF for display in IE without sending the data to the server? Wondering if there is an existing JavaScript library that will parse the PNG data and output GIF, or even JPEG. I know that I can send the PNG data to a server and have PHP / Python / or whatever generate a file for display in IE, but I'm aiming to keep this all on the client side even if the processing of

解决IE6背景图片有灰白背景的情况 转

若如初见. 提交于 2020-01-13 14:01:23
前言 :IE6不支持png背景透明或半透明。其解决方法有IE滤镜,纯粹的JavaScript,以及jQuery等,正所谓事非经过不知难,让png图片在IE6下背景透明显示只是第一步,如果对这些png图片做进一步的操作,往往会出现各类莫名的问题。而本篇文章讲详尽阐述png背景透明会出现哪些问题,一些自己的经验之谈和一些相关的拓展。内容较多,有一定的深度和广度,希望对大家有帮助。 一、可解决的方法 1. IE css 滤镜 IE css滤镜中有一个使png背景透明的滤镜,JavaScript方法也是应用的这个滤镜实现png背景透明的。 写法:filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’../image/png_test.png’); 用法示例: .png{background:url(../image/png_test.png);} * html .png {background:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’../image/png_test.png’);} 非IE6浏览器使用正常的background定位,IE6去除背景图片,应用png透明滤镜。 如果您的浏览器或内核为IE6,强烈建议 点击这里

SVG/PNG extension switch

喜夏-厌秋 提交于 2020-01-13 11:34:10
问题 Is there a way to use SVG images on my site and if browsers/devices do not support it, switch the extension to png? Is there a better way to do this? Note: I am using the <img> tag and Modernizr. Here is my code that spits out the images dynamically. <?php $attachments = attachments_get_attachments(); ?> <?php if( function_exists( 'attachments_get_attachments' ) ) { $attachments = attachments_get_attachments(); $total_attachments = count( $attachments ); if( $total_attachments ) : ?><?php for

C# Saving huge images

☆樱花仙子☆ 提交于 2020-01-13 08:20:09
问题 I'm having difficulties when trying to save huge images with C# (I'm talking about over one gigabyte). Basically I'm trying to do this in parts - I have around 200 bitmap sources and I need a way to combine them before or after encoding them to a .png file. I know this is going to require lots of RAM unless I somehow stream the data directly from hard drive but I have no idea how to do this either. Each bitmap source is 895x895 pixels so combining the images after encoding doesn't seem easy

IE6下png背景不透明——张鑫旭博客读书笔记

橙三吉。 提交于 2020-01-13 05:50:48
从今天开始跟着大牛张鑫旭的步伐,每天进步一点点 问题:IE6不支持png背景透明或半透明 一、可解决的方法 补充:css滤镜主要是用来实现图像的各种特殊效果。(了解) css滤镜的标识符是“filter”,总体的应用上和其他的css语句相同。css滤镜可分为基本滤镜和高级滤镜两种。css滤镜分类 CSS滤镜 可以直接作用于对象上,并且立即生效的滤镜称为基本滤镜。而要配合JavaScript等脚本语言,能产生更多变幻效果的则称为高级滤镜。 只有IE可以完全的支持滤镜,Firefox支持部分,其他内核的浏览器一律不支持。 更多关于滤镜的知识:http://www.cnblogs.com/shiyangxt/archive/2008/11/16/1334633.html 1. IE css 滤镜 IE css滤镜中有一个使png背景透明的滤镜,JavaScript方法也是应用的这个滤镜实现png背景透明的。 写法:filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’../image/png_test.png’); 用法示例: .png{background:url(../image/png_test.png);} * html .png {background:none; filter:progid

IE6 PNG 图片问题分析

一个人想着一个人 提交于 2020-01-12 17:49:54
背景:作为web前端的程序员都知道,许多需要使用png图片,但是目前仍然占据大部分市场的IE6却有着png图片背景不能透明的bug,下面分析一下: 目录: 一、可解决的方法 1. css滤镜 2. 老JavaScript方法 3. jQuery实现 4. flash实现 二、产生的问题 1. 响应单击事件 2. 图片大小控制 3. 背景图片的定位 三、相应的解决方法 1. 响应单击事件 2. 图片大小控制 3. 背景图片的定位 四、相关延伸的问题 1. png8与png24的半透明显示 2. IE7的半透明滤镜与png背景透明 五、小结 一、可解决的方法 1. IE css 滤镜 IE css滤镜中有一个使png背景透明的滤镜,JavaScript方法也是应用的这个滤镜实现png背景透明的。 写法: filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’../image/png_test.png’); 用法示例: .png{background:url(../image/png_test.png);} * html .png {background:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’../image/png