png

Rendering an image at runtime in WinRT

时间秒杀一切 提交于 2019-12-23 02:01:47
问题 I found that WriteableBitmap.Render() is not supported in WinRT. Is there any other API for drawing bitmap images in Metro? I need to render some xaml-primitives (Rectangles, Circles, Paths, etc.) to png-image. 回答1: It is indeed not supported yet. Your best bets are to either use WriteableBitmapEx or Direct2D. 来源: https://stackoverflow.com/questions/11840835/rendering-an-image-at-runtime-in-winrt

微信公众号推送文图片什么尺寸最佳?(转)

筅森魡賤 提交于 2019-12-23 01:34:45
作者:trickyEdecay 链接:https://www.zhihu.com/question/27138896/answer/127500504 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 我是看到目前最高赞的答案飘过来的2333 看到最高赞的尺寸是 600 x 275 而官方推荐的大图尺寸是 900 x 500 作为一只标准的强迫症(误 我就是想拿 900 x 500 来画鬼符 折腾了老半天,终于测出 我的标准 (oh,对了,我没有量具体的尺寸,反正就是导出了几张png,以后做封面的时候直接放在最上面的图层就可以对着看了) 1.单图文封面 多不过感觉也是够用的,总结一下 iPhone不会对图片进行裁剪 iPad会对图片左右两侧进行裁剪 Android会对图片上下两侧进行裁剪 分享给朋友/到朋友圈会直接裁剪至只剩中间部分(上图红色部分) 2.多图文的主封面 多图文就相对来说比较复杂了,总结一下 iPhone不会对图片进行裁剪 iPad会对图片上下两侧进行裁剪 Android会对图片上下两侧进行裁剪 分享给朋友/到朋友圈会直接裁剪至只剩中间部分(上图红色部分) 图中黑色部分是多图文才有的,因为多图文有一个标题会挡住图片,这里测出了三种设备的标题高度 (不同的设备之间还是存在微小差异的,所以说,设计的时候请不要踩线! 不要踩线! 不要踩线!

How can I scale up an SVG and save as PNG, with PHP without losing quality?

血红的双手。 提交于 2019-12-23 00:49:43
问题 I have a batch of SVG images that I need to resize and then save as PNG, and I'd like to use PHP to do it. Similar questions to mine have been asked but none of the solutions work for me. For example: option A : use PHP to change the width and height attribute of the SVG. problem with A : this seems to work fine but in fact it only increases the canvas size, not the contents of the canvas. I'm not sure if it's important but my SVGs are small graphics that were created with Illustrator, mostly

How to query the bit depth of a PNG?

梦想的初衷 提交于 2019-12-22 23:42:29
问题 I have a PNG file which has 8-bit color depth as evidenced by file properties: Yes, when I open the file var filePath = "00050-w600.png"; var bitmap = new Bitmap(filePath); Console.WriteLine(bitmap.PixelFormat); I get Format32bppArgb . I also looked in the PropertyIdList and PropertyItems properties but didn't see anything obvious. So how do I extract the Bit Depth from the PNG? P.S. None of the framework methods seem to work. System.Windows.Media.Imaging.BitmapSource might work but it's only

Combining two PNG images into one image using .NET

狂风中的少年 提交于 2019-12-22 18:15:09
问题 I have two (actually many) PNG (.png) images in my application. Both have transparent areas here and there. I want, in my application, to take both images, combine them, and display the result in a picture box. Later I want to save the result through a button. So far I managed to find the two images and combine them, but it seems the transparency thing won't work. I mean, if you put one image over another, only the top image is visible as the result because, apparently, the image's background

“Show Package Contents” of iPhone build release reveals blank PNGs?

半世苍凉 提交于 2019-12-22 12:43:22
问题 So I successfully completed my first iPhone release build and when I curiously went to "Show Package Contents" of the freshly-baked .app file, I noticed that all the contained PNGs are blank! They are all set to the appropriate resolutions, but when I open them, there's nothing to see but the default Preview.app grey. I tried opening other .app "package contents" (from OS X apps) to see if their PNGs were visible and sure enough they were. So is this business as usual for an iPhone .app build

PNGj, metadata doesn't get saved

徘徊边缘 提交于 2019-12-22 12:26:30
问题 I'm trying to save metadata, but it doesn't get saved, an i don't get any errors either. The image get saved correctly. I'm using the PNGJ library. Reading metadata, (and the image) works correctly, and i'm checking with imagemagick. The code is: ImageInfo imi = new ImageInfo(size.x, size.y, 8, true); PngWriter pngW = new PngWriter(outputStream, imi); pngW.setCompLevel(compressionLevel); pngW.getMetadata().setText(PngChunkTextVar.KEY_Title, "My image"); ImageLineInt iline = new ImageLineInt

Clipping a filmstrip in png format (Delphi 2010)

烈酒焚心 提交于 2019-12-22 10:38:08
问题 I have a filmstrip of images in png format like this: I'd like to know how to clip each of the images and put these images in a TImageList control, always preserving the transparency. [EDIT] Yes, at designtime the trick mentioned by RRUZ works fine, but I wanted to clip the images at runtime, i.e. by loading the filmstrip from resource or file 回答1: You must follow these steps: set ColorDepth property to cd32Bit , DrawingStyle to dsTransparent , Height = 48, Width =48, then load the image and

How can I tint transparent PNG files in PHP?

南楼画角 提交于 2019-12-22 10:32:42
问题 I have a transparent PNG image. The transparent areas need to remain completely transparent, but the other areas need tinting with a particular hue. What's the best way to do this using GD? Cheers, James 回答1: The above solution didn't work for me. You are filling alpha region here with red; that I believe is not the objective. Objective is to tint the rest of the image and leave the alpha unchanged. (Also, wrong use of function imagecolorallocate, you should use imagecolorallocatealpha.) I

PNG: deflate and zlib

瘦欲@ 提交于 2019-12-22 09:57:02
问题 I'm trying to understand compression in PNG - but I seem to find a lot of contradictory information online ... I would like to understand - how is searching done in the LZ77-part: hash table with linked lists? is this defined in deflate? or implemented in zlib? is there a choice of the search method? - can PNG encoders/decoders set some parameters for the compression (strategy, filter, etc.) or is there a default for PNG? - does the LZ77-part do greedy or lazy evaluation? or is this an option