Saturday, October 7, 2017

vector - Vectorizing pixels in bitmap images for infinite resizing. Possible?


Just putting this out there for discussion, and because I can't currently think of why it wouldn't work...


Imagine you converted every pixel of a bitmap image into a vector square. Could you then resize that image (or the collection of vector square "pixels") proportionally and infinitely, essentially creating a vector-bitmap image?



What would be the limitations or hindrances of this?


If it's possible, couldn't it be implemented anywhere and everywhere (eg. like svg for websites, etc.) so we no longer have the "raster-images-get-blurry-when-enlarged" problem? Some sort of automatic conversion tool (ie. open/import a bitmap image and it's automatically "read" and converted to a vectorized-pixel image), even within Photoshop itself, that could turn any old raster image into a fully responsive vector-pixel image?


Why hasn't this happened yet?


Pixels



Answer



It wouldn't really add anything. That is what pixel images are anyway, a map of discrete colored squares, exactly the same as if you converted each pixel to a vector square.


Take this image from my answer on a previous question asking how to do exactly what you are talking about:


256 pixel tile increased to 6400 pixels


That is a 256 pixel square tile increased in size to 6,400 pixels square, with apparently no loss in image quality. As long as you increase the size of the image in integer multiples, you get no apparent loss in quality. What you will never get is an increase in quality (which is what people who don't understand the nature of bitmap images may expect)


The loss in quality you get from increasing the size of an image comes from anti-aliasing and interpolation... But, the important thing here is, you would also get that with your vectorized pixels!



Vector images still need to be rasterized or rendered for you to see them on your screen, which means any vector image you see has at that point been turned in to a pixel based image. Your screen is made up of pixels after all. And since your vector/bitmap hybrid image is basically still made up of pixels, you still get the same effects.


Here are some comparisons of images being enlarged with different methods:


Interpolation comparisons


The first enlargement is with no interpolation, which preserves the sharpness. The problem with this is that the sharpness is just enlarged pixels, which is generally what people don't want. The second enlargement is done using bicubic interpolation. This gets around the pixelation problem, but the result is a distortion that most of the time looks worse. There are better algorithms and methods for enlarging images but that is a whole other subject!


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...