Add picture frame with title and annotations

RaymondP

Member
I developed a PixInSight Script that automatically adds a picture frame with an image title and room for annotations. It can be freely downloaded from github: https://github.com/RaymondPackbier/PixInSight_AnnotationFrame.git.
The resulting image and user interface can be seen here: Image on Astrobin

The text is scaled and centered automatically so only minimal user interaction is required.
The annotations at the bottom are customizable and standard fonts can be selected from the menu. You can however use any font on your system by typing the font name in the box.

Note that some external fonts may not render correctly.

If you experience any errors or bugs, please let me know
happy-1.png
.

CS,
Ray
 

Attachments

  • annotationframe_demo.jpg
    annotationframe_demo.jpg
    427.2 KB · Views: 243
  • example1.jpg
    example1.jpg
    433 KB · Views: 209
  • example2.jpg
    example2.jpg
    125.9 KB · Views: 201
  • Example3.jpg
    Example3.jpg
    299.5 KB · Views: 201
  • Screenshot_UI.jpg
    Screenshot_UI.jpg
    161.6 KB · Views: 207
For some reason, I cannot add this via Feature Scripts. It is saved in a folder but PI doesn't add this specific one. If ru via Run Script, I get

*** Error [133]: /Users/xxxxxx/AnnotationFrame.js, line 7: SyntaxError: syntax error

<!DOCTYPE html>

^
 
For some reason, I cannot add this via Feature Scripts. It is saved in a folder but PI doesn't add this specific one. If ru via Run Script, I get

*** Error [133]: /Users/xxxxxx/AnnotationFrame.js, line 7: SyntaxError: syntax error

<!DOCTYPE html>

^

Hi Freed,
I think you accidentally downloaded the HTML page instead of the script itself.
To save the script from GitHub, you need to press the green 'code' button and then 'download ZIP'.

I'll see if I can provide an easier way of downloading the script.

Regards,
Ray
 
Thanks. It works that way. Is there a way to modify the font size ? Is it showing as very small on my test. A 9600 X 6400 frame.
Thanks
 
Hi Freed,

good that it works now! The font size should scale automatically, could you maybe store the image so I can see if it looks as intended?
 
Hi Ray

The font does seem a bit small, though I did only try the default of Helvetica.

I know that you wanted minimal user interaction but it might be good to be able to choose the font size.

Thanks for the script.

Gordon

m27_framed.jpg
 
Last edited:
Hi Camastro, yes I agree they could be a bit bigger.
Right now the script makes the border and then scales the font to size.
I'll include a parameter to set the border size, that way the fonts will also scale up.

I am currently working on saving the text in the fits header, so it becomes easier to experiment with different fonts without having to re-enter the text. As soon as that is done, I'll include the parameter and post a new version here.

Thanks a lot for your feedback!

CS,
Ray
 
Hi all, I just uploaded a new version to the github site. This version allows for adaptable font sizes and also stores the values in the FITS header to make experimentation with fonts and sizes a lot more comfortable.
I also made a user manual to describe how the script works. I updated the first post in this thread with new example pictures and UI picture.

All the best,
Ray
 
Hello,

What is the purpose of the black square in the middle of the script. Is that supposed to show a preview ?
Also, on this version on MAC OS, when the script opens, I cannot access the bottom of the script, i.e. I cannot resize.
Thank you
 
Hi freed,

The black square is support to visualize the image, so the user can see that the title is above, and the other text boxes are below the image. It has no function other than that.

I scaled down the user interface and hope is fits on your screen now. I uploaded version 0.31 to Github, could you give it another shot and let me know?

All the best,
Ray
 
Hi Ray,
Thank you for providing this script, it is great and makes my images stand out. Having installed and run several times on some images there is only one area I am having problems with. I seem to be unable to change the font. I have tried selecting different fonts within the pull down but all my images show the same text, not sure which one it is. I tried typing in a font I know is within my Win10 fonts but still the same Font appears, any advice would be greatly appreciated.
 
Hi Submariner,

Thanks for the kudos!
Could you check if you have the same problem if you use the DrawSignature script?
It uses the same mechanism for selecting fonts, but maybe I overlooked something...

All the best,
Ray
 
Hi Ray,

I tried the Drawsignature script and all the fonts selected show the same font in the finished signature block. The only variance was Courier which showed a slightly different font but the text was always minute, about 1/20 the height of the other signature. I am using the latest pixinsight software which is fully up to date with automatic downloads. My PC is running Win10 pro which is also fully up to date. I checked the Windows Font directory and there are a lot of different font scripts available including some I have down loaded in the past.

Any attempt to write one of these Windows fonts within the Drawsignature or AnnotationFrame fails to change the default Font which always appears. I don’t wish to distract you from your other important work and will continue to use the script as is.

Your script is now a valued component in my image workflow and again may I thank you for your kind generosity in providing it to us members, it is greatly appreciated .

Kindest regards
Martin
 
Back
Top