png

IE7 and “jaggies” around layered PNGs (with jQuery)

人盡茶涼 提交于 2019-12-23 15:37:32
问题 I seem to be experiencing "jaggies" ( jagged pixelation, black in this case ) around PNG files, specifically with anti-aliased edges such as rounded borders ( say, a large glossy button for example ) in IE7 . I think I've experienced this issue before, however it may not have been as obvious in a previous design. Thing is, it only appears when I fade the PNG ( and in this case, fade in another for a snazzy rollover effect ) because initially, it appears fine. Anyways, I'm not too certain

Images Flash White in Internet Explorer 9 While Navigating

落爺英雄遲暮 提交于 2019-12-23 15:31:19
问题 I am developing a website in XHTML 1.1/CSS 3.0 and I have a problem with Internet Explorer 9. Each time I change pages from "Home" to "Features" various images flash 'white' before filling in. This 'white flash' occurs each time the page is changed. I have seen numerous stack overflow posts discussing such errors but they seem to be for older versions of IE. The site looks fine in Chrome. Here is what I've tried so far -- ran XHTML through validator (it passes). ran CSS Level 3 validator (it

How can I add a transparent PNG as a toolbar icon?

送分小仙女□ 提交于 2019-12-23 13:06:30
问题 My intention is to create a toolbar in Win32 containing a transparent icon. I have tried the following code to create a simple toolbar with one button having a custom image: // Create the toolbar HWND hToolbar = CreateWindow(TOOLBARCLASSNAME, NULL, WS_CHILD | TBSTYLE_FLAT | TBSTYLE_AUTOSIZE | TBSTYLE_LIST | CCS_BOTTOM, 0, 0, 0, 0, hwnd, NULL, ghInstance, // <-this is the HINSTANCE of the application NULL); // Set the font (this cannot be the problem) SendMessage(hToolbar, WM_SETFONT, (WPARAM

Selecting all the divs with png background-image

半城伤御伤魂 提交于 2019-12-23 12:36:35
问题 How can I select in jQuery all the div s that have background-image: url(somepath/somename.png) in their style? 回答1: There isn't a jQuery selector, but this might work: $('div').each( function() { if ( $(this).css('background-image') == 'url("image.png")' ) { // do something here } }); However, a more efficient method would be to make sure you only have a single class that uses that background image, then simply select $('.bgClass') 回答2: Try adding a custom selector: $(document).ready

I want to save a .png image from AndroidPlot

家住魔仙堡 提交于 2019-12-23 12:29:15
问题 I have written a code which plots a Line Graph. This graph is plotted by using Android Plot.. How can i save this graph as .png image?? 回答1: xyPlot.setDrawingCacheEnabled(true); int width = xyPlot.getWidth(); int height = xyPlot.getHeight(); xyPlot.measure(width, height); Bitmap bmp = Bitmap.createBitmap(xyPlot.getDrawingCache()); xyPlot.setDrawingCacheEnabled(false); FileOutputStream fos = new FileOutputStream(fullFileName, true); bmp.compress(CompressFormat.JPEG, 100, fos); 回答2: You can get

How can I decrease the amount of time it takes to save a png using QImage?

蹲街弑〆低调 提交于 2019-12-23 12:28:52
问题 Using Qt 4.8rc1, I have a QImage that I want to convert to a png file. It seems like it is taking longer than it should to convert to png format: ~70ms for an 800x800 empty png. Is there a way I can make this more efficient, or am I just inherently limited by png/zlib? Here is the benchmark I am running: #include <QtGui> #include <QTimer> int main(int argc, char *argv[]) { int times = 1000; QString format("png"); QByteArray ba; QBuffer* buffer = new QBuffer(&ba); buffer->open(QIODevice:

Convert a 2D array of int ranging from 0-256 into a grayscale png?

♀尐吖头ヾ 提交于 2019-12-23 10:14:25
问题 How can I convert a 2D array of ints into a grayscale png. right now I have this: BufferedImage theImage = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); for(int y = 0; y<100; y++){ for(int x = 0; x<100; x++){ theImage.setRGB(x, y, image[y][x]); } } File outputfile = new File("saved.bmp"); ImageIO.write(theImage, "png", outputfile); but the image comes out blue. how can I make it a grayscale. image[][] contains ints ranging from 0-256. 回答1: The image comes out blue because setRGB is

Is there a .NET library that can convert PNG files to PDF?

送分小仙女□ 提交于 2019-12-23 10:10:56
问题 I have an application where I need to convert PNG files PDF on the fly. Is there an existing library that will do this? I would like the PDF to look exactly like the PNG--no extra margins, no borders, etc. I'm using .NET 4.0. EDIT: I tried iTextSharp and it worked great. Here's the basic code to get what I needed. using System; using System.IO; using iTextSharp.text; using iTextSharp.text.pdf; public class ITextPDFHelper { public static void Main(string[] args) { ITextPDFHelper.CreatePDF("C:\

How do you edit a .png programmatically?

陌路散爱 提交于 2019-12-23 09:27:12
问题 I have 28 images that have 3 sizes each (84 total) that are all monochrome with different alpha layers to make each image. I want to make each of them available in 5 different colors. that would be 420 images total. This would obviously be a huge pain to do manually. I do not have Photoshop so any type of photoshop function is not a valid answer. I have Paint.NET but the adjust hue doesn't work for me because changing the hue alone does not give me the colors I want. Basically what I need to

Poor quality of png images drawn into html canvas

谁说胖子不能爱 提交于 2019-12-23 09:05:12
问题 I am trying to draw png image into the canvas, but the quality is really poor. I am doing that using the drawImage method: src = folder+self.cur+".png"; imageObj.src = src; imageObj.onload = function() { context.clearRect(0, 0, cv, ch), context.drawImage(imageObj, 0, 0, cv, ch) }; Attached is an original image and the screenshot of the result in the canvas. For now canvas dimensions are the same as the image, so the problem is not caused by the resizing. Any ideas what is causing this issue