graphics

Image Optimization

倾然丶 夕夏残阳落幕 提交于 2020-01-14 03:32:44
问题 I want to know like converting an image (gif or jpeg) to png8 using yslow smushit will increase the speed of the site performance? Will that work in ie6? 回答1: It depends on the image. PNG is suited to images with blocks of color, whereas jpeg is good for photo type images. Smushit will shave off any extraneous bytes, reducing the filesize, but if you have many small images in separate files, then you should consider spriting them in order to reduce the number of connections required to load

Assembly - How to set graphics mode in UEFI (No VGA, No BIOS, Nothing deprecated)

五迷三道 提交于 2020-01-14 03:13:17
问题 Tools I'm using: nasm, qemu-system-x86_64. Operating System I'm on: Windows 10. So I checked out the "Real Mode OS Warning" at https://wiki.osdev.org/Real_Mode_OS_Warning What the article seems to imply is that everything can be done without using BIOS interrupts whatsoever. I know how to load Long Mode, and so I've done this, but now I am stuck because BIOS interrupts were all I knew until now. I want to do something like set the graphics mode to full-memory-access-mode (might sound familiar

How to add a color key to a pairs() plot?

谁都会走 提交于 2020-01-14 03:02:31
问题 Goal: I have an adjusted pairs plot in R and I would like to add a color key to it. The panel backgrounds in the pairs plot show certain colors determined from a matrix of numbers. I would like to have a color key to the right of the pairs plot which shows these colors and some labels indicating the numbers. I found some ways how to add color keys to image() plots (for example, image.plot in the fields package; colorbar in the matlab package; color.legend in the plotrix package). So, in

Image rotation in 3D space around Y axis

爷,独闯天下 提交于 2020-01-14 02:39:08
问题 I have a BufferedImage and I want to rotate the image (Picture) around the Y axis in Java with theta angle not affine transform. The rotation will be like the image below (the rectangle will be an image). I can do this by rotating each pixel of the image and drawing the image. Because I have to rotate a lot of images, I don't think this is the best idea. How I will do this transformation? Thanks for your help. 回答1: Generally, you'll want to find the inverse transform from your output pixel

How to do a space-partitioning of the Utah Teapot?

蹲街弑〆低调 提交于 2020-01-13 16:55:37
问题 Having dealt with converting the Bezier Patches into triangles, I need to do a Binary Space Partition in order to draw the projected triangles using the Painter's Algorithm. I've implemented the algorithm from Wikipedia with much help with the math. But it's making a Charlie Brown tree! That is most of the nodes have one branch completely empty. The whole strategy is all wrong. Since the teapot is essentially spherical, the entire shape is only on one "side" of any particular component

Detecting wether a point is inside a SVG Path

大兔子大兔子 提交于 2020-01-13 14:50:52
问题 I'm trying to detecting wether a given point is inside a closed SVG path in Objective-C. I'm having trouble figuring out how to do the math. I have a path's coordinates and I'd like to determine wether a random point is inside or outside the path. Here's an example of a path's coordinates: "M673 460 c2 0 4 -1 5 -2 1 -1 2 -2 2 -4 0 -2 0 -3 0 -3 0 0 -3 1 -5 1 -3 1 -5 2 -5 3 0 1 0 3 0 4 1 0 2 1 3 1z:" I'm aware of the CoreGraphics's containsPoint: method, but I'd like to avoid using this method.

How to draw an array of pixels directly to the screen with OpenGL?

主宰稳场 提交于 2020-01-13 12:42:30
问题 I want to write pixels directly to to screen (not using vertices and polygons). I have investigated a variety of answers to similar questions, the most notable ones here and here. I see a couple ways drawing pixels to the screen might be possible, but they both seem to be indirect and use unnecessary floating point operations: Draw a GL_POINT for each pixel on the screen. I've tried this and it works, but this seems like an inefficient way to draw pixels onto the screen. Why write my data in

winforms graphics with nearest neighbor filtering clipping edges of image

雨燕双飞 提交于 2020-01-13 10:07:03
问题 I'm writing a Chip8 emulator/interpreter. It's going great. To the point I need a UI to play some games and watch this bad Jackson in motion. I first ran into a problem where drawing the framebuffer (which is just a bitmap) to the screen was super-blurry. After figuring out I needed to set the interpolation mode to Nearest Neighbor it looked much better, but it seems the edges of the image are either being clipped or I'm misunderstanding the interpolation at work. Here's a screenshot. The

winforms graphics with nearest neighbor filtering clipping edges of image

跟風遠走 提交于 2020-01-13 10:04:28
问题 I'm writing a Chip8 emulator/interpreter. It's going great. To the point I need a UI to play some games and watch this bad Jackson in motion. I first ran into a problem where drawing the framebuffer (which is just a bitmap) to the screen was super-blurry. After figuring out I needed to set the interpolation mode to Nearest Neighbor it looked much better, but it seems the edges of the image are either being clipped or I'm misunderstanding the interpolation at work. Here's a screenshot. The

winforms graphics with nearest neighbor filtering clipping edges of image

牧云@^-^@ 提交于 2020-01-13 10:03:30
问题 I'm writing a Chip8 emulator/interpreter. It's going great. To the point I need a UI to play some games and watch this bad Jackson in motion. I first ran into a problem where drawing the framebuffer (which is just a bitmap) to the screen was super-blurry. After figuring out I needed to set the interpolation mode to Nearest Neighbor it looked much better, but it seems the edges of the image are either being clipped or I'm misunderstanding the interpolation at work. Here's a screenshot. The