Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Behaviour differences when enlarging images

Hello all!  Been making my first face on the versa 3, and it is pretty fun. However, for my use, I need to enlarge an image of 3x3 pixels in PNG format, and enlarge to full screen size.  In the simulator, it works perfectly, with all pixels as squares, but on the versa 3 device, it would appear to be a set of blurry blobs.  Is there a setting I can change so I can get the pixels to enlarge sharply?  Thank you very much.

Best Answer
0 Votes
8 REPLIES 8

I'd be inclined to try doing this backwards. Use a 336x336 image and reduce its size on the watch when you don't need it that big.

 

A potential problem is that the watch is a lot less powerful than the sim, so may not like resizing a large image. If that's a problem, you could probably achieve the same effect with a bunch of 9 rects and some cunning code.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Thank you for the quick reply.  Actually, maybe it is easier to describe what I am trying to do.

 

I am trying to use tiles of 3x3 PNGS (512 of them) to construct QR codes on the fly by putting them in an array of 15x15 tiles (225 tiles). These 225 SVG images tags are already in the index.view file, which I will change the href of each tile. This is why I cannot have much larger PNG files to save some space.   To illustrate the blurring effect, I have attached some images.  Not quite sure if it is settings.

 

 

device.pngsimulator.png

 

Best Answer
0 Votes

Wouldn't it be easier to do so with rects instead of images?
switching between display="none" to display="inline"?

although I don't know, how much tags you actually would need
I assume that processing images in that range just might be too expensive.

Best Answer
0 Votes

Thank you Barbara. That was the first thing I tried, but seems the elements would stop drawing when the element count is over around 300.  I actually got it working at the moment by making the PNG files with more pixels.

 

It is just puzzling to me that given limited processing power, there should be a way of turning off the blur. 

Best Answer
0 Votes

ah yes, I feared the necessary number of elements might hit any limit.

You might try to go with less rects and change their coordinates dynamically. Just theoretically. I don't know anything about QR codes

 

 

 

Best Answer
0 Votes

I'm curious: why do you want to zoom small segments of a QR code?

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hi Peter,

I don't. I just need to generate QR codes on the fly which I found to be quite complicated. This is why I generated all the combinations of 3x3 grids, and put them at the right places to form a QR code. This would reduce the number of elements on the view from 2025 (45x45)  to 225 (15x15). However, the 3x3 images need to be enlarged to 18x18 pixels using the width and height attributes to fill the screen, and the images become very blurry.

 

What I find interesting is that in the simulator, the enlargement of images result in sharp edges, whereas on the device, they are blurry, and I want to see if there are ways to switch off the image processing that causes blurriness. 

 

My current solution is to actually make larger images files (all 512 of them) and the edges looks much better. 

Best Answer
0 Votes

Thanks for the explanation. That sounds like a good approach.

I don't think there's a way of changing the scaling behaviour. It might be done in hardware on the watch.

It's actually possible to construct a .TXI image file (which is how .PNGs are represented on the watch) using code on the watch. But it's a lot of work, and quite slow. If nothing else works for you (and you're very determined), it might be an option.

Peter McLennan
Gondwana Software
Best Answer
0 Votes