Image Size #1420
-
I am a bit confused about the different sizing options in config.sh - and did not really got to a good result using trial and error. The camera is a RpiHQ camera and thus the maximal available image size is 4056 x 3040. Now with the settings like:
I get the current live-view picture like whis is perfectly well: The startrails is totally oversized: The keogram is oversized as well: The timelapse videos are perfect in size with full resolution: Now what parameters would I need to change so that startrail and keogram pictures are reduced in size and both live-view and timelapse keep being in full resolution? The website is here: http://80.219.133.218/Bern/allskyB2.htm |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 2 replies
-
@WirthmU Hi, First, there's no reason to
All that's doing is resizing each picture to the existing size, so is only taking CPU and slightly decreasing quality. Can you check what the resolution is of a startrails.jpg and keogram.jpg file?
and see if all three picture have the same height. The startrails should have the same width as image.jpg, but the keograms' width may differ some. I think you'll find the files are correct, but the http://80.219.133.218/Bern/allskyB2.htm page isn't displaying them correctly, so that's something you'll have to fix. Allsky is working fine. |
Beta Was this translation helpful? Give feedback.
-
I thought so, too @EricClaeys about the IMG_RESIZE="true", I have set it to false already. Resolution checks are as following and yes, they all are of the same height exactly as you mentioned:
The html code on my page site to display is:
The code that then displays the image seems to be in the index.php file from the allsky-webesite files (allsky-website/index.php. All thumbnails look correct and also the videos are in full resolution. Only the startrails and the keograms seem to be oversized. Is this index.php file the reason for the different resolutions? What is the difference between:
and:
?? |
Beta Was this translation helpful? Give feedback.
-
@WirthmU It looks like you fixed the problem by simply having a click on the thumbnail show the full picture, and not a picture in your web page. That's what the Allsky Website does and IMHO is the nicest way, because it shows the picture as large as possible. I would leave it the way it is. I'm not very good with CSS, especially when one object is inside another which is inside another, so wouldn't be able to help anyhow. The names of the variables in config/config.sh aren't totally consistent. All the ones in the
resize the images from the camera before saving them. As sensors get larger, people may not want a full-sized image - they take more disk space and CPU power to process. An example: you have the RPi HQ which is 4056 x 3040. Do you have a monitor with that high a resolution? If not, you may decide it's not worth having full-size picture. On the other hand, you may like to zoom in on the images so decide to keep full-size file. But if the next PRi camera has twice the resolution, I suspect the cheap lenses we have combined with the distortion from the cheap plastic domes most of us have will not support that resolution, and the lower-end Pi's won't either. The RESIZE_UPLOADS* variables should be called IMG_RESIZE_UPLOADS*, and tell Allsky to resize the image.jpg file before uploading it. You may want full-size images on your Pi but smaller images uploaded, especially if your network bandwidth is slow or you pay per MB, as some people do. Does that help? It was a good question. |
Beta Was this translation helpful? Give feedback.
-
Thank you @EricClaeys and yes, it makes perfectly sense. Also - and this is just a detail and about consistency - slightly restructure :
to
And another question is why some of the parameters are with quotation marks (") and others no (maybe its because some are used as text and others as figures only):
And btw speaking about distortion and cheap plastic domes. For two of my four allsky cameras I went away from domes and changed to flat glass and it looks much better. Also I keep looking for better quality lens. The ones I use for my RPiHQ is an Ultra Wide-Angle C-Mount Lens with 3.2mm Focal Length. |
Beta Was this translation helpful? Give feedback.
-
@WirthmU, Re: quotes vs no quotes. Find me a totally consistent human and I'll make 'em an Allsky developer!! Technically, quotes are only required around strings that have "special" characters in them, like spaces, semi-colons, and others. However, for the most part I've been putting them around booleans (true, false), and anything that's not a number, and when I want to show a variable is empty, e.g., Re: domes. Tell me more. With a fisheye lens, how does flat glass work? The lens will see where there's no glass. Or are your lens not fisheye, e.g., not ~ 180 degrees? Re: lens. I have a feeling we're not going to find any Canon/Nikon quality lens in a C-mount size. I'm just guessing that the cheap lens we have won't support super-high resolution. I've never done any testing so could easily be wrong. |
Beta Was this translation helpful? Give feedback.
-
I keep playing with the settings in config.sh to understand what is going on. With the following settings I get the pictures with the right size in my website:
This is what I find on the web server the day after and it is what I would expect:
Now using the following settings:
I get the following sizes and obviously the pictures on the website are oversized again:
So it looks like the only thing that is being re-sized on the Web-server if I leave the size of the original picture on the RPi untouched is the image.jpg. Neither startrails nor keogram seem to be impressed by the I guess for your Re:domes and Re:lens I will open up new discussions. |
Beta Was this translation helpful? Give feedback.
-
@WirthmU That's behaving as expected. The "RESIZE_UPLOADS" only applies to image.jpg as it's being uploaded, so all the images in allsky/images/DATE are full size, and those are what the keogram, startrails, and timelapse use, so those would also be full size. |
Beta Was this translation helpful? Give feedback.
-
@EricClaeys The funny thing is that with RESIZE_UPLOADS="false" and IMG_RESIZE="false" even though image.jpg is full resolution and still perfectly visible as an entire picture on the website whereas startrails and keograms - which are of about the same size - when they are called from the thumbnails are totally oversized. But I guess this then has to do with re-programming HTML-code and CSS. A possible solution would be to resize startrails and keograms in their respective scripts before uploading them to the Web-server. Maybe this would be another functionality in allsky? |
Beta Was this translation helpful? Give feedback.
-
@WirthmU You repeated repeated with RESIZE_UPLOADS="false" and RESIZE_UPLOADS="false". I assume one of the "RESIZE_UPLOADS" should have been a different setting, maybe "IMG_RESIZE"? On my observatory Pi with a ZWO, I crop the image to get ride of most of the black border, but I don't resize the image so the keogram, startrails and timelapse are full cropped-size. When I go to my website using Edge or Chrome, then look at a keogram or startrails, they appear as big as the browser window, and the cursor is a "+" in a circle, and clicking on the image displays it full resolution and I have to scroll in the browser window to see it all. Take a look at my site. It's running the new website code which allows some customization of the home page, but the keograms, startrails, and timelapse are the same. |
Beta Was this translation helpful? Give feedback.
-
@WirthmU. Just added, with this text.
It won't make it in the next release, though. |
Beta Was this translation helpful? Give feedback.
@WirthmU,
I want to limit the changes to config.sh since we're eventually going to replace it, and whenever I change the name of a variable I need to make sure it's changed in all the scripts that use it, and the Wiki is updated, and people know about the new name. But I agree your restructure is better.
Re: quotes vs no quotes. Find me a totally consistent human and I'll make 'em an Allsky developer!! Technically, quotes are only required around strings that have "special" characters in them, like spaces, semi-colons, and others. However, for the most part I've been putting them around booleans (true, false), and anything that's not a number, and when I want to show a variable is empty, …