andreknieriem / photobooth

A photobooth Web-Application for raspberry pi with gphoto2
https://photobooth.andrerinas.de/
MIT License
300 stars 163 forks source link

Feature request: Text overlay for photo printing #9

Closed vrs01 closed 5 years ago

vrs01 commented 7 years ago

It would be nice to overlay one line of text maybe at the bottom of the printed fotos. Like the title of the event and the date ("Wedding of XY and YX, 1st of April 1916").

Seppel0815 commented 6 years ago

Look at imagemagick, you can edit the php Files (i have insert a overlay Watermark with imagemagick)

jensfr1 commented 6 years ago

Can you share the example?

thymon13 commented 5 years ago

Yes I need too :)

Do you have an exemple to insert imagamagick code in the print.php file ?

vdubuk commented 5 years ago

file print.php uses GD to merge the Photo and QR code

GD has a function to add text to an image imagefttext

I am a newbie with php but am going to try to use GD imagefttext as it is already used in print.php

vdubuk commented 5 years ago

Very rough test. in file print.php

after

imagecopyresized($print, $code, $width, 0, 0, 0, ($height / 2), ($height / 2), imagesx($code), imagesy($code));

insert the following

` // font colour $black = imagecolorallocate($print, 0, 0, 0);

// text on print - ensure you include path to your font imagettftext ($print, 30, 0, 850, 350, $black, 'resources/fonts/GreatVibes-Regular.ttf' , 'Line 1 text' ); imagettftext ($print, 30, 0, 850, 450, $black, 'resources/fonts/GreatVibes-Regular.ttf' , 'Line 2 text' );`

ScreenShot001

vdubuk commented 5 years ago

My next step is to try and add options to the admin panel to allow for easier change of text, font, size etc..

andi34 commented 5 years ago

Thanks. Let me know if you have something ready, else I might be able to look at it at some point this week.

andi34 commented 5 years ago

discussion/development continues here https://github.com/andreknieriem/photobooth/issues/68