How to crop an image without losing color values

Sometimes, after carefully processing a RAW image of a wide field, I crop a small portion I’m interested in to discard the rest. But, given the discarded area contained a significant fraction of the color values, Siril readjusts the color values of the pixels in the small portion I cropped. Or at least this is the impression I get.

How can I crop an image in such a way it keeps the full range of color values and doesn’t lose any?

1 Like

I’m sorry but I don’t understand how the crop could lead to a color loss?

I’ve never experienced this lose of colours and I’m cropping a lot. Do you crop before or after debayer? You must crop after debayer your images. If not, you are breaking the bayer matrix layout and the color retrieve from it will be difficult (or impossible). Perhaps that’s your current problem.

1 Like

Thanks all but I can no longer reproduce the issue, it may well have been a debayer issue.

Here’s some more context anyway.

In Siril 0.9.12 for Linux I opened a FITS image converted with debayer from a DNG shot of the Moon I took with my Pixel 4 XL phone at 2X optical zoom. Here’s what the image looked like after adjusting the sliders for the various channels:

Then I cropped an approximately square area 2-3X larger than the crescent and here’s what I got:

I had to switch to Histogram and Zoom to fit to make the cropped portion appear again, with the expected color.

I’m using Siril for Linux on the Debian Linux subsystem (Crostini) of Chrome OS.

Hmmm it looks like an issue of your package.
You should try to use the last version.

Could you run a flatpak package?

It could be. But Linux support is still in Beta on Chrome OS, so that could just be a display glitch unrelated to Siril.

I wanted to try Siril 0.99.4 as I’m curious about the new features but I run into dependency issues similar to the ones reported here. I can’t find Siril’s PPA in the announcement or other documentation I could find.

Yes, it looks like a refresh issue.

The PPA are here: https://launchpad.net/~lock042

Thanks. Althought I’ve added the PPA, I don’t know how to configure the GPG key and what’s the correct Siril package to install.

You just need to do:

sudo apt remove siril
sudo apt-add-repository ppa:lock042/siril
sudo apt install siril
1 Like

I did, but it installs Siril 0.9.10 while I expected 0.99.4:

$ sudo apt-get install siril
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  gnuplot
The following NEW packages will be installed:
  siril
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,260 kB of archives.
After this operation, 5,848 kB of additional disk space will be used.
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package siril.
(Reading database ... 53221 files and directories currently installed.)
Preparing to unpack .../siril_0.9.10-2_amd64.deb ...
Unpacking siril (0.9.10-2) ...
Setting up siril (0.9.10-2) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for shared-mime-info (1.10-1) ...
Processing triggers for desktop-file-utils (0.23-4) ...

Also, when updating I get an error about the PPA’s signature:

$ sudo apt-get update
Hit:1 https://deb.debian.org/debian buster InRelease
Get:2 https://deb.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://ppa.launchpad.net/lock042/siril/ubuntu groovy InRelease [18.0 kB]
Ign:4 https://storage.googleapis.com/cros-packages/84 buster InRelease   
Hit:5 https://storage.googleapis.com/cros-packages/84 buster Release
Err:3 http://ppa.launchpad.net/lock042/siril/ubuntu groovy InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A0F0E3D9922C071B
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/lock042/siril/ubuntu groovy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A0F0E3D9922C071B
E: The repository 'http://ppa.launchpad.net/lock042/siril/ubuntu groovy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I tried again but I still can’t install versions later than 0.9.10. It’s as if the PPA wasn’t recognized and Siril was installed from the Debian repo.

PPA is not recognized because of GPG key

Take a look here: https://linuxconfig.org/ubuntu-20-04-gpg-error-the-following-signatures-couldn-t-be-verified

1 Like

Thanks again, I appreciate it very much.

I don’t know what keyserver to supply as an argument to apt-key in step 2 of the tutorial.

So I saved the key A0F0E3D9922C071B to a file lock042.gpg and run sudo apt-key add lock042.gpg but got the error gpg: no valid OpenPGP data found. Now I have an empty file /etc/apt/trusted.gpg.d/lock042_ubuntu_siril.gpg.

Hello,

Take the time to read this post it seems to me that you will find the solution there : https://serverfault.com/questions/851724/apt-key-add-on-debian-stretch-no-valid-openpgp-data-found
Clear Skies,

Laurent

1 Like

Thanks. I seem to understand the fix involves removing or regenerating the file /etc/apt/trusted.gpg, which is missing altogether on my system. So I’m not sure how to apply it to my case.

But If I can’t install the Siril Beta, it’s not a major issue. I was just curious about the new features but, for my current needs, version 0.9.12 is more than enough. I can wait for 1.0 stable to be released and distributed through Debian’s official repo.

Siril 0.99.4 is on its way: https://tracker.debian.org/pkg/siril
For Debian testing.

2 Likes