Xournal question

Hi all, :wave:

I recently introduced a friend of mine (via anydesk) to xournal (GTK+ Application for note taking).

I like using it for conveniently filling in pdf forms and even inserting my personal signature into PDFs.
I know that can also be done with gimp (merging layers) but I find it much more easy to do with xournal. :wink:

It works well for me but my friend seemed to have encountered some difficulties employing the “graphics” button for image insertion into a self-composed text.

The imported image was displayed upside down and we found no way to turn it around in xournal.

The thing is: it works perfectly normal with me. I tried it on my system and the image was always inserted the right way. :thinking:

Does anyone have a clue what might be the cause of this curious problem :question:

Thanks a lot in advance.

Many greetings from Rosika

BTW: My friend and I are both using Linux Lite.

2 Likes

Hi Rosika,
I suspect your friend’s image has at some time been rotated before it was imported.
You could test this idea by rotating an image, then importing it. If what I suspect is correct, the importing will remove the rotation.

https://superuser.com/questions/1607310/is-it-possible-to-change-orientation-of-jpg-image-without-rotating-it-and-thus

Can you tell us about this Xournal app. I get that it accepts handwritten input. Do you need a pen and drawing tablet to drive it?
Regards
Neville

2 Likes

I concur with @nevj - happens to me sometimes too - I flip an image in shotwell - then go to use it elsewhere, and it’s not flipped, but it shows in Nautilus / Files and Shotwell as flipped…

I think the best way to ensure consistency - is break out the CLI and use imagemagick (e.g. convert, or mogrify) : e.g. :

mogrify -rotate 180 imagefile.jpeg

But I’m guessing your friend is not up to using the CLI ?

3 Likes

I think what is happening is… there are 2 ways of rotating an image

  • move the pixels
  • change the rotation flag in the Exif header
    I think viewers like Shotwell , do the latter if you ask for a regular rotation… like 180 degrees… Then some other program
    might use the image without looking at the header, so it appears unrotated.

A nice mess for someone to sort out.

4 Likes

So you are saying Imagemagick will always move the pixels

1 Like

Yes - it’s “destructive” - but still pretty good… If I don’t want it to “destroy” - I use convert instead of mogrify…

Can’t remember the exact syntax…

Probably not used much any more - but it’s a “traditional” tool used in UNIX since at least the 1980’s or thereabouts… I remember many apache servers hosted on UNIX and Linux systems would have imagemagick scripts in “cgi-bin”… I can remember long ago (circa 2000) getting the source code to build on some Silicon Graphics systems running IRIX that I managed… But then I found MIPS64 IRIX binaries anyway - didn’t need to compile it…

Hi @all, :wave:

thank you so much for providing such good help. :heart:

First of all:

Here´s some info:

Xournal is a program for the simple creation of notes, digital notebooks (e-journals) and sketches, which can also be used to edit PDF files.

It behaves like an image editing program that places a transparent level on a background on which you can write and draw.
Data is stored as a file with the .xoj extension.
This can be provided with a PDF file as a background. There is also a function to export as a PDF file.

The program is particularly practical when using a graphic tablet. Since the graphics library GTK+ is used for the interface, it can also be used under Xfce, Mate and LXDE in addition to GNOME.

Functions:

  • Pen tool
  • etching tool
  • Font tool
  • Text highlighting
  • Outline detection

In an existing journal, further pages can be inserted via “Page - New Page before / after”

(from: Xournal › Wiki › ubuntuusers.de # in German, translated via “firefox translations” add-on )

Further reading:

@nevj :

That may very well be the case, Neville. :+1:
I´ll ask my friend about it next time we talk again.

Sounds like a very good idea. That I will try, of course.

Thanks also for the links, Neville. I´ll look up the information provided by them.

This could be verified, can´t it?
… by checking the exif data wit exiftool before and after rotation and then compare the values :question:

@daniel.m.tripp:

That´s certainly a promising command. Thanks Dan.

I used the mogrify command in the past, but not the -rotate option. I wouldn´t have thought of that, I have to admit.

I believe I used the command for resizing image files.

Well, not on regular basis, I guess. But that doesn´t matter as we normally connect via anydesk and so I can introduce the respective command to her.
So it shouldn´t be a problem.

I have to wait for her being availbale though, as she´s a high school teacher and the new school term has just begun. :wink:

Thanks again so much to all of you for your help. :heart:

Many greetings from Rosika :slightly_smiling_face:

1 Like

There is a fork called GraphicsMagick… supposed to be better.

2 Likes

Thanks, Neville, for bringing this to our attention. :heart:

I found it here: http://www.graphicsmagick.org/ .
It´s in ubuntu´s repositories, too.

I´ll look into it.

Cheers from Rosika :slightly_smiling_face:

Indeed. Anything in the Exif header can be viewed.

Note there are other types of image metadata… there was a post recently discussing them… but I think your issue is Exif.

2 Likes

Hi Neville, :wave:

I was just looking at an example jpeg file.
I couldn´t find the rotation flag. May it be displayed under another name?

P.S.:

I found “orientation”. That´s certainly it, right?

Seems right

2 Likes

Thanks, Neville. :heart:

I´ll do the experiment.

Hi again, :wave:

I tried it but I can´t spot any difference:

rosika@rosika-Lenovo-H520e ~/Musik [0|1]> exiftool kgw_20Urlaub2023.jpeg | grep -i rotat
Orientation                     : Rotate 90 CW
rosika@rosika-Lenovo-H520e ~/Musik> mogrify -rotate 180 kgw_20Urlaub2023.jpeg 
rosika@rosika-Lenovo-H520e ~/Musik> exiftool kgw_20Urlaub2023.jpeg | grep -i rotat
Orientation                     : Rotate 90 CW

Rotation took place however. So the mogify command worked.

Cheers from Rosika :slightly_smiling_face:

Because imagemagick does not change the Exif flag, it actually moves the pixels around in the image.

3 Likes

O.K., Neville. That´s the explanation. Thanks.

shotwell doesn´t change it either it seems:

I opened up the image file in shotwell, applied the “flip vertically” button and looked at the outcome.


rosika@rosika-Lenovo-H520e ~/Musik> firejail --private=(pwd) shotwell
[...]
Parent is shutting down, bye...
rosika@rosika-Lenovo-H520e ~/Musik> exiftool kgw_20Urlaub2023.jpeg | grep -i rotat
Orientation                     : Rotate 90 CW

After shutting down shotwell the image rermains turned around.
So: no EXIF data change here either.

Thanks again and cheers from Rosika :slightly_smiling_face:

3 Likes

I am surprised, I thought shotwell might flip the exif flag
live and learn

2 Likes