Friday, December 20, 2024

Tamtorials - Fixing aspect ratio of Second Life snapshots from inventory using IrfanView

Do you have a Second Life snapshot that you would like to share on the internet, but all you have is a copy inside your inventory because you didn't save the shot to disk instead?

In that case the exported image will likely have its aspect ratio distorted, which wouldn't look very good for posting.

 

This happens because Second Life treats uploaded snapshots like any other uploaded texture. As you can see here in the Snapshot Tool floater, your resolution options are restricted to texture format standards, such as 1024x1024, 512x512, etc.


This will of course lead to distorting, unless you happen to be shooting at a custom square resolution to crop the image, because PC monitors do not have a 1:1 aspect ratio. The result is that your image in inventory is now squished as to fit the format of a texture image, and that is how it will stay when you export it for uploading elsewhere on the internet.


But fret now, we can unsquish your snapshots.

Ideally you would take snapshots to disk to avoid the issue entirely (more on that later), but this tutorial will show you how to salvage your inventory snapshots.

 

For this I will be using Irfanview in this demonstration, but if there is an image editor of your choice that has the same type of feature, you are welcome to use what you prefer.


(Note: I am a Linux user and Irfanview is a Windows program from before I made the switch. Any minor differences in UI you'll see in my screenshots stem from running Irfanview through the WINE translation layer, so don't worry about it looking a little different.)

 

Step 0 

If you do not already have Irfanview installed, you can find the official download links on the homepage here: https://www.irfanview.com/

You can go with the default settings during installation or customize as you see fit.

Once you'll have it install, launch IrfanView to follow along the next steps.


Step 1

Via the File menu open up your squished snapshot that you had exported out of Second Life, then navigate to the Image menu and click on Resize/Resample (or hit Ctrl+R)


Step 2

This will bring up a menu floater that provides you with a set of options for changing your images to a new resolution.


We will want to customize these.

First of all, for what we are doing to do NOT want to retain the original aspect ratio, since we are trying to fix it, so please untick the checkmark next to "Preserve aspect ratio (proportional)" for this use case.

Second, we want to set the resolution that your snapshot was originally supposed to have. In the case of my example was taken at my monitor resolution of 1920x1080, so that is what I'll set inside the input fields of the "Set new size" section.


Alternatively you can click on one of the radio buttons on the right hand side of the menu where it is offering a set of standard dimensions, if one of them happens to match your monitor OR you can click on the radio button for "Desktop size (no aspect ratio)". That will attempt to stretch it to match your monitor automatically.

(If however the snapshot had been saved to inventory by a friend and given to you, it is possible that their monitor's dimension do not match your own, so you may have to ask them for their desktop resolution values or experiment with the "Set new size" values until the image looks proportional.)

 

Now click the OK button and what we'll get should be the original dimensions of your snapshot, or very close to them.


Step 3

You can now go to the File menu again and "Save" or "Save As" your unsquished snapshot! (If you are saving in jpg format, please remember to adjust the quality slider to 100% before saving, as it defaults to 80%.)


Now you have your snapshot in the proper dimensions so that you can share it without your pretty picture being ruined by the dreaded squish.


---------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------


Bonus section:

 

As I've mentioned near the beginning, the best way to avoid this issue is to not save your images to inventory, or at least not have that be the only way you save them. You can always still upload snapshots into SL if you've saved them to disk, if you do need to have them inworld for sharing there.

I would suggest that in the Snapshot Tool floater you instead press the "Save to disk" button. This will offer you with a much better set of options, free of the restrictions of SL texture uploads.



From top to bottom you can:

1. Change the capture mode from Color to one of the depth modes.

Taking a duplicate shot set to depth you can use that depth map image to more easily create a selection mask in your image editor of choice to separate your avatar from the background for example.


2. Toggle interface and HUD elements.

Maybe you would like to make tutorials yourself for example and you can snapshot UI elements this way. Please make sure you disable those tickboxes when you are done! Otherwise all your future snapshots would also still show those things when you don't want them.

 

3. Set a filter

These are a few quirky filter presets you may have some fun playing around with.

 

4. THE BIG ONE - Custom full size resolutions


Unlike uploads, you have free range of choice what resolution you want to save your snapshots to disk at.

Be that your monitor resolution, an upscale at the same aspect ratio (in Alchemy viewer it helpfully shows the ratio behind the resolution, I don't know if that is the case in other viewers), or even a custom resolution that does not match your monitor of course.

(If you set a 1:1 ratio of resolution values such as 4096x4096 for example, the output will be a square crop of the center of the view, as you can preview via the >> button at the top of the floater after you hit "Refresh")

You can pick which image format to save as. The JPEG encoder that Second Life uses gets good results when set to 100%, but if you want lossless quality for highly detailed editing, you could use PNG instead.

 

5. Save / Save as

I suggest that you click the down arrow next to the "Save" button to select "Save as" when you first set up where to store your snapshots and how to name them.

The name you set will be extended onto with a number count.

So far example if I enter: Tam_2024 then the first image saved will be called Tam_2024_001 , then the next time I Save a snapshot it'll be Tam_2024_002 , and so on and so forth.

 

(It is not limited to 999 per name by the way. It will go to 1000 and beyond, although I would suggest to create a new subfolder about every 1000 snapshots.

Operating systems can start to struggle with indexing several thousands of thumbnails within a single folder, as I know from experience.

So personally I do several sequentially numbered sets of ~1000 snapshots per year.

I name it like Tam_2024_001 until it hits around Tam_2024_001_1000 , which I then stick into a subfolder named Tam_2024_001.

Then I do a new "Save as" in the Snapshot Tool to change the name to Tam_2024_002 as to save new shots that way until about Tam_2024_002_1000 , and then I stick those into subfolder Tam_2024_002 etc.

You get the gist. Do things how you like of course. It's just an organization suggestion.)

No comments:

Post a Comment