image-scaling

Scaling down bitmap causes portion of image not visible

早过忘川 提交于 2019-12-11 12:46:26
问题 So, I'm scaling down bitmap files so that I can display images without going over the memory size. I referred to the android tutorial here. What I found out was that not only is this scaling down my image so the size won't be too big but it is also cutting a portion of the image off. Or so it seems. I only want the image to take up a part of the screen. How can I scale down the bitmap and display the whole image? If you could provide any help, ideas, or suggestions I'll be very thankful! And

How to resize multiple images proportionally?

蹲街弑〆低调 提交于 2019-12-11 07:51:50
问题 I'm creating a new HTML5 page that has multiple image layers. The first layer is a background layer that is a full screen image (proportional to the screen size). The second layer is another image object, which I want to be in a fixed position proportional to the first layer; so if I changed the browser size, both of the 2 images would change size so they are proportional one to each other. Does anyone have any idea how can I do so? 回答1: So, let's suppose we have a "sky.jpg" background image

imagesc function in Matlab

那年仲夏 提交于 2019-12-11 07:24:24
问题 I was recently looking at the imagesc function on: http://www.mathworks.co.uk/help/matlab/ref/imagesc.html What I want to do is take a square matrix of anything, doesn't matter what, integers, characters etc. and produce an image of it so that I can draw over the top of it i.e. so it produces an image like this: http://iching.egoplex.com/faq.html Can the imagesc function do this? Because trying it so far, I have only been able to get multicoloured squares? Edit: I tried: a = ['a','b','c';'d',

Resizing pictures while still preserving quality in android

不想你离开。 提交于 2019-12-10 18:38:12
问题 I want to reduce the image file size below 100 KB while preserving the image quality like whatsapp and facebook did. I tried almost all the code of android image compression available on stackoverflow but that doesn't work for me. Right now i am following this blog to reduce the image size, and i am getting the image below 100 KB but image quality is poor. Is there any way that i can reduce image size below 100 KB while preserving the quality??? (Original Image size can vary from 20 KB to 8

Scaling image with CSS Transition

南楼画角 提交于 2019-12-10 18:34:19
问题 This is how I want to scale my images, smoothly without any jumps. My attempt does not work like in the gallery above, the image (red square in my case) jumps, my code: section { background-color: rgba(0, 0, 0, 0.701961); width: 400px; height: 400px; } div { position: absolute; top: 120px; left: 120px; width: 160px; height: 160px; background-color: red; -webkit-transition: all .2s ease-in-out; } div:hover { -webkit-transform: scale(1.8); } <section> <div></div> </section> How to fix this? The

Webkit + jQuery + SuperBGImage: full-browser images not anti-aliasing

两盒软妹~` 提交于 2019-12-10 16:20:01
问题 This image best illustrates the problem: I'm customizing a WordPress theme that uses SuperBGImage. In Safari 5.1 and Chrome 13, when resizing the browser window, images aren't anti-aliased smoothly and artifacts are clearly visible. You can readily compare the SuperBGImage demo to the production site... SuperBGImage Demo vs. My Project I've added demo images to the WordPress site (personal category) for direct comparison. The image of the cherries is the most obvious. I've been working at

How to specify the image scaling algorithm used by a WPF Image?

雨燕双飞 提交于 2019-12-10 15:26:49
问题 Is there a way to specify how an image is scaled up in an Image element with LayoutTransform set to a ScaleTransform with integer values for ScaleX and ScaleY ? I want to display the scaled image crisply (ie using 'nearest neighbour' scaling), with no blurring. (Imagine how you would want a bitmap editing program to behave when zooming in). I noticed the protected property VisualBitmapScalingMode on Image , so created a subclass of Image that sets this property to BitmapScalingMode

Scale large images using Java and AsyncScalr

 ̄綄美尐妖づ 提交于 2019-12-10 10:42:41
问题 I'm using AsyncScalr in a Servlet to scale down some large images (~ 10-15 MegaBytes), the actual resizing process takes about 40ms which is not much. The overkill comes from Reading the Image from Local Storage as a BufferedImage. so the times are mostly like : read the image file : 1630ms !! resizing the image : 41ms writing the image : 40ms below is the code that I'm using, is there any more optimal way to do this? final FileImageInputStream fileImageInputStream = new FileImageInputStream

Android image scaling

依然范特西╮ 提交于 2019-12-08 12:37:32
问题 I'm making an app for 1.6 and I'm having a problem with android image scaling, I have a picture that's 480x295. On a medium screen this appears correctly, but on a large screen (480x800 or 480x854) it doesn't fill the screen, it android makes the image 1.5x bigger, which is only 720x442. As 800 is actually 1.67 and 854 is 1.78, I can obviously just include large images for the drawable-hdpi folder, but the image is already 1.5mb, which is larger than people seem to like, and I can't use

Rendering smallest possible image size with MVC3 vs Webforms Library

て烟熏妆下的殇ゞ 提交于 2019-12-08 04:00:19
问题 I am in the process of moving a webforms app to MVC3. Ironically enough, everything is cool beans except one thing - images are served from a handler, specifically the Microsoft Generated Image Handler. It works really well - on average a 450kb photo gets output at roughly 20kb. The actual photo on disk weighs in at 417kb, so i am getting a great reduction. Moving over to MVC3 i would like to drop the handler and use a controller action. However i seem to be unable to achieve the same kind of