Sailfish Community News, 5 October, Camera2 progress

Sailfish OS update from Jolla

As many of you will know when the Xperia 10 III release was announced we made clear that there were a number of areas that needed more work. At the time we wanted to be open and clear about this. One important area was that of the camera. As we explained at the time, changes to the underlying Camera API combined with an underlying firmware glitch meant that only the standard back-facing camera (12 MP, f/1.8, 27mm, 1/2.8", PDAF) was available for use.

Sailfish OS hooks into the Android Camera API to access the camera firmware. The glitch exists in this version of the API, but is fixed in the Camera2 API. Switching Sailfish OS to use the Camera2 API is a large, but not impractical, amount of work. What’s more, because the code that needs changing is open source, and we’ve had a number of excellent contributions to the camera pipeline from the community in the past, we’re hoping we can work together with you in the community to get this resolved in a future release.

There has been increasing effort to make progress on this from the community over the last few months and it’s excellent to see the contributions bearing fruit. Taking this on board, Jolla developer Matti Lehtimäki (mal) has been working in the background, taking on board this work and making progress on porting Sailfish OS to use the Camera2 API. This week he revealed some of the exciting progress he’s been making.

Currently viewfinder and still image capture works as do most of the camera controls. Various issues still exist in the code such as incorrect colors in viewfinder (appears to be BGR vs RGB issue) and flash not always working reliably.

While the work isn’t ready yet, he has pushed his changes to the camera2 branch of the drodmedia repository for others to access. Mal is continuing to work on some of the areas that are currently not yet working.

Video recording is completely unimplemented at the moment and I will look into that after I try to fix the current issues in the code.

Mal’s announcement gained a good response on the forum with Vlad G (vlagged) testing out his work, confirming the status and giving us a vivid impression of how he felt about it:

This is so empowering I am dancing in my room as we speak.

I think we can all get behind that! We hope to include more progress following Mal’s work in future newsletters.

Repository roundup

There has been several new repositories arriving in Github. They are containing code developped by Jolla, previously under a proprietary license, now available to the open source community under a BSD 3-clauses license. Everyone can submit PRs, propose changes… and interact with Jolla to bring new functionalities, correct bugs, provide documentation for these parts of the OS.

Communication services

Browser

User interface

  • sailfish-secrets , a framework to use encryption techniques, dcaliste adjusted the code not to show again the confirmation to access a GnuPG secret if it was dismissed by the user just before.
  • sailfish-components-gallery , QML components to handle the image and video gallery, is a new repository with code that has been relicensed to BSD.
  • sailfish-components-filemanager , QML components to create a file manager, is also a new repository with code relicense from proprietary to BSD. It comes with the full commit history, with an initial commit from Joona Petrell back in 2016, stating “Create a simple file manager. Contributes to JB#5771”.
  • sailfish-locale , some localization defintions, is a new repository. dcaliste patched a spelling mistake for the FR locale definition file.
  • sailfish-minui , a simple UI loop to allow user interaction, is also a new repository allowing user interaction in a graphical way without having a full user session started. This can be used to ask passphrases early in boot for instance.
  • sailfish-components-accounts , QML components on top of the account framework, allows to create and manage accounts (like iCal subscription, IMAP email server…). Its history goes back to december 2012 with an initial commit from Chris Adams.
  • sailfish-device-encryption , encryption at device level, is the last new repository listed this fortnight. It contains all the pieces used to handle the encryption at device level, from the encryption service to the unlock UI.

Audio and video layer

Low level libraries

SDK and developer tools

App roundup

It’s been a busy fortnight of app updates since the last newsletter. Once again there are more releases than can reasonably be covered but don’t fret, we’ll be sure to take a look at any that we miss in the next newsletter.

First up is a completely new release from prolific app developer Mark Washeim (poetaster). It’s always exciting to get to look at new releases, but regular readers will know I’m a sucker for a game, and Mark has been busy working with the Godot game engine to create several new games over the last year.

His latest, Molecules, is a version of Miskatonic Studio’s open source Godot game of the same name. It’s a simple, slick and addictive game that requires you to take on the role of a molecule in a survival-of-the-fittest scenario, except here you’re fighting not just to survive, but to consume all and not be consumed. If you’ve played the 2009 game Osmos then you’ll be familiar with the concept. In case you’ve not, you take the form of a circle at the centre of the screen (presumably a molecule of some sort!), surrounded by other circles of different sizes.

You can move your circle gently around the screen, but with added inertial physics to keep things interesting. But things get really interesting in the event you collide with another sphere. If your circle is the larger of the two you’ll consume it along with its mass and volume. If on the other hand you’re smaller, it’s you that will be consumed, in which case the game ends with you losing.

It’s such a simple but effective mechanic. Your task is to thread your circle carefully between the larger red circles consuming smaller blue circles en route. As you consume other spheres you grow larger, running the risk of causing you to collide with other spheres nearby. Although circles change colour — from red to blue — depending on whether they’re larger or smaller than you, on occasion you’ll have to make a careful judgement about which is larger. Many times I’ve got it wrong and… game over! But if you do survive long enough to absorb more than half the available mass, you win the game.

The game is great, although the first few seconds of the game are typically critical. It doesn’t take long for it to become clear whether your statue is too small to break through, or large enough that no other spheres can compete.

The game works fine on an Xperia 10 II, but is noticeably easier given the greater framerate — and by extension control — you get from running in on an Xperia 10 III.

Molecules is available from the Jolla Store and OpenRepos. As Mark explained to me, only the aarch64 version is available in the Jolla Store due to an issue with the Store. However, “other versions are on OpenRepos. Without Sailjail, though.”

When I first saw the name and screenshots of PikeFight, the new app from Fredrik Axling (faxling), I thought I was looking at another game. It turns out it’s not a game but a sport. Based on the tripometer app, PikeFight is an app for documenting your fishing exploits. It presents you with a map on which you can record the fish you’ve caught along with their vital statistics (size, photo, time, date and so on). The app can be configured to support up to three teams simultaneously, along with a minimum allowed size of fish to record.

I can’t claim familiarity with fishing competitions, but I can see how an app like this would be a great boon for anyone involved in serious, or friendly, fishing competitions, or even just to record your own catches. The app is nicely configurable allowing for different styles of maps, and while the interface has some unusual quirks, such as the way the entire image rotates along the vertical access to switch between map and stats, this certainly adds to its character. The only criticism I’d have is that the pull-down menu is both somewhat unwieldy with eight entries, and also not as easily accessible as it could be given the way the page is designed.

Although a new release to the Jolla Store PikeFight is already at version 1.4.4. Fredrik has made a nice Screen Recorder video of it available on YouTube in case you’d like to check it before you commit to an install, and there’s also a discussion thread about it on the forum.

Our next app is for the photographers amongst us. The Raw View app from Heiko Bauke (bauke) is an image viewer that, besides the usual JPEG and PNG images, can also handle professional image formats including RAW, NEF and CRW images.

Usually when you take a photo your phone’s camera, including the driver and software that goes with it, will process your photos in all sorts of clever ways in order to ‘enhance’ the appearance of the photo. RAW images are intended to capture the image data as it comes directly from your camera, before any processing takes place.

Most post-processing is at least partially lossy, so the idea with RAW images is that they allow you to perform our own post-processing starting from the best possible place.

As well as the industry-standard RAW format, the app also supports the NEF and CRW formats, which are Nikon’s and Canon’s raw formats respectively.

The app will display the image in all its unprocessed glory. It also gives the option to show image metadata and has a handy screen for quickly selecting an image to avoid you having to scroll through your entire album an image at a time.

The latest version of Raw View adds some minor user interface improvements, with version 0.4.0 being available from the Jolla Store.

Finally for this roundup we have Fotokopierer, an app which I’ve personally been using for some time and consider to be an excellent way to quickly grab a high-quality ‘scan’ of a document.

Your phone, with its high-quality camera, is ostensibly a scanner in your pocket. But if you’re taking a photo of a document it can be tricky to get the angle just right so that you’re left with a neat rectilinear representation of the document you’re trying to capture.

Fotokopierer from Frank Fischer (fifr) helps you work around this using a clever software solution. The app will manipulate your wonky photo in software in order to make it look as close as possible to a proper scan.

Once you’ve capture a photo of your document, as a user you just need to drag the four handles to the corners of the document. Neat little preview windows pop up so you can do this as accurately as possible. If you’re in a rush, hit the ‘auto’ button to get the app to position these handles for you (although in my experience this is often a bit hit-and-miss).

Once arranged you can move to the next screen to have the image distorted so as to make the document look as rectangular as possible. At the stage the result is usually very good, but can now also have colours adjusted (contrast, brightness) to help clean up the image as much as possible. This is especially useful if you’re capturing a textual document, although I admit I’m not always convinced by the results. In general I find the transformation step to be more effective than the re-colouring.

I’ve found the app to be super-useful for situations when I don’t have a scanner to hand, when a scanner wouldn’t really work (for example taking photos of posters), or when something quick and easy is all that’s really needed. And in these situations I’ve found it to make an excellent companion to my phone’s camera.

The latest version fixes the Sailjail permissions and is available from both the Jolla Store and OpenRepos. Frank has also put together a Web page for the app with lots more info in case you want to learn more about it.

That’s it for this newsletter; a really nice collection of apps I hope you’ll agree. Once again us users continue to benefit from the effort of the Sailfish OS community of developers out there. Thank you all!

Please feed us your news

Once gain we hope you enjoyed reading this community newsletter! Good progress on Camera 2 API and a lot of input from the community. As always, please do not hesitate to share your ideas, thoughts, or suggestion for future newsletter topics. This is your news!

Big thanks to mal, flypig, and dcaliste regarding your input on this newsletter!

Please do also join us at our community meetings on IRC, Matrix and Telegram. Next community meeting will be on the 12th October.

36 Likes

These are really big news!

1 Like

Thanks for all the great updates! A lot to digest!

1 Like

The opening up of so many components really is great, at the same time a bit concerning.

Is it because something changed at Jolla for the better (like say a big customer who previously prevented this not having a say any more), or is it a sign of SFOS being discontinued, and these are salvage releases so to speak?

6 Likes

The opening of the nextcloud and gallery stuff has inspired me to do GitHub - nephros/gallery-extension-advancedcam

… which displays pics and videos from Advanced Camera as separate tiles/folders in Gallery.

I’m thinking of expanding on this to enable similar tiles for well-known media locations, perhaps even configurable in some way. (dconf key? section in .desktop similar to MyBackup? Something like that.)

So apps or users can register their image and video dirs and they automatically appear as Tiles in Gallery.

24 Likes

To me it looks like the latter, unfortunately.

Anyone interested is welcome to try the packages from here:

https://build.sailfishos.org/project/show/home:nephros:sailfishos:gallery-extensions

Source here:

with ‘Magic’ living in the magic branch.

6 Likes

Really great idea you had! Installation went fine on my side.

Perhaps magic should be moved to the gallery parameter (in Settings->Left->Gallery).

2 Likes

I was pondering this but forgot how to do that :wink:

Great to hear that more parts are open source. Can you list new repositories? I just notice sailfish-weather :slight_smile:

Here you are: Recently released repositories - #22 by poetaster

1 Like

@rainemak, as has been noted in the other thread, all the new repositories have been unpublished again.
Can you comment on this?

12 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.