Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into HEAD
Browse files Browse the repository at this point in the history
Change-Id: If31b60bf8752a7aec44417616972b18270f1f916
  • Loading branch information
andi34 committed Sep 27, 2020
2 parents 82da0e6 + b3bee97 commit a868b06
Show file tree
Hide file tree
Showing 27 changed files with 919 additions and 178 deletions.
52 changes: 41 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ This is my personal Photobooth fork with some extras on top (more information ca
- Standalone Gallery ([localhost/gallery.php](http://localhost/gallery.php)).
- Slideshow via Gallery or standalone Gallery (under [localhost/slideshow](http://localhost/slideshow)).
- Settings can be changed via Admin Panel (under [localhost/admin](http://localhost/admin)):
- Multi-language support:
- German
- English
- Spanish
- French
- Greek
- Multi-language support
- [Translate on Crowdin](https://crowdin.com/project/photobooth)
- Login to protect Admin Panel and/or Start page can be enabled.
- Gallery:
- Order pictures in gallery ascending oder descending by picture age.
Expand Down Expand Up @@ -65,6 +61,7 @@ This is my personal Photobooth fork with some extras on top (more information ca
- access login via [localhost/login](http://localhost/login) instead [localhost/login.php](http://localhost/login.php)
- offline manual with settings explained under [localhost/manual](http://localhost/manual) ([andi34/photobooth#59](https://github.com/andi34/photobooth/pull/59))
- offline FAQ under [localhost/manual/faq.html](http://localhost/manual/faq.html)
- disk usage page, access via admin panel or at [localhost/admin/diskusage.php](http://localhost/admin/diskusage.php)
- fix windows compatibility
- fix check for image filter
- performance improvement ([andreknieriem/photobooth#226](https://github.com/andreknieriem/photobooth/pull/226))
Expand Down Expand Up @@ -94,10 +91,47 @@ This is my personal Photobooth fork with some extras on top (more information ca
- Preview/Stream from device cam as background on start page ([andi34/photobooth#58](https://github.com/andi34/photobooth/pull/58))
- Allow using a stream from URL at countdown for preview
- Allow to rotate preview from URL
- Show button bar inside gallery on bottom or on top of the image
- Auto reload Photobooth on error while taking a photo
- Allow to change permissons on picture
- qrHelp: define WiFi SSID used on QR via admin panel
- Updated [PhotoSwipe Gallery](https://github.com/andi34/PhotoSwipe)
- Show button bar inside gallery on bottom or on top of the image
- allow to adjust PhotoSwipe Gallery config via Adminpanel, also allow to use some PhotoSwipe functions and make more PhotoSwipe settings available (settings explained inside the manual):
- Mouse click on image should close the gallery (enable/disable)
- Close gallery if clicked outside of the image (enable/disable)
- Close picture on page scroll (enable/disable)
- Close gallery when dragging vertically and when image is not zoomed (enable/disable)
- Show image counter (enable/disable)
- Show PhotoSwipe fullscreen button (enable/disable)
- Show PhotoSwipe zoom button (enable/disable)
- PhotoSwipe history module (enable/disable)
- Pinch to close gallery (enable/disable)
- Toggle visibility of controls/buttons by tap (enable/disable)
- allow to adjust PhotoSwipe background opacity (0-1)
- Loop images (enable/disable)
- Slide transition effect (enable/disable)
- Swiping to change slides (enable/disable)
- gallery: button to delete an image, enable by default
- Remote Buzzer Server based on io sockets
- Enables a GPIO pin connected hardware button / buzzer for a setup where the display / screen is connected via WLAN / network to the photobooth webserver (e.g. iPad)
- Choose thumbnail size:
- XS = max 360px
- S = max 540px
- M = max 900px
- L = max 1080px
- XL = max 1260px"
- Advanced printing functions [#109](https://github.com/andi34/photobooth/pull/109):
- Auto print function
- allow to delay auto print
- allow to adjust time "Started printing! Please wait..." is visible
- allow to trigger print via defined key
- options to show the print button independent (e.g. can be only visible on gallery)
- Advanced collage options [#108](https://github.com/andi34/photobooth/pull/108):
- Choose collage layout:
- 2x2
- 2x4
- 2x4 + background image
- Collage: apply frame once after taking or to every picture of the collage

## :camera: Screenshots

Expand Down Expand Up @@ -133,10 +167,6 @@ If you like my work and like to keep me motivated you can buy me a coconut water

[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/andreasblaesius)

### :information_source: Donators Early Access

Donators who donated 5€ or more get early access to new features/options i am adding (please leave a message at donation telling your email address).

### :mortar_board: Tutorial

[Raspberry Pi Weddingphotobooth (german)](https://www.andrerinas.de/tutorials/raspberry-pi-einen-dslr-weddingphotobooth-erstellen.html)
Expand Down
6 changes: 4 additions & 2 deletions api/applyEffects.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
$filename_thumb = $config['foldersAbs']['thumbs'] . DIRECTORY_SEPARATOR . $file;
$frame_path = __DIR__ . DIRECTORY_SEPARATOR .$config['take_frame_path'];
$collage_frame_path = __DIR__ . DIRECTORY_SEPARATOR .$config['take_collage_frame_path'];
$collage_background = __DIR__ . DIRECTORY_SEPARATOR .$config['collage_background'];
$picture_permissions = $config['picture_permissions'];
$thumb_size = substr($config['thumb_size'], 0, -2);

if (isset($_POST['isCollage']) && $_POST['isCollage'] === 'true') {
$collageBasename = substr($filename_tmp, 0, -4);
Expand All @@ -32,7 +34,7 @@
$collageSrcImagePaths[] = $collageBasename . '-' . $i . '.jpg';
}

if (!createCollage($collageSrcImagePaths, $filename_tmp, $config['take_collage_frame'], $collage_frame_path)) {
if (!createCollage($collageSrcImagePaths, $filename_tmp, $config['take_collage_frame'], $config['take_collage_frame_always'], $collage_frame_path, $collage_background)) {
die(json_encode([
'error' => 'Could not create collage'
]));
Expand Down Expand Up @@ -115,7 +117,7 @@
}

// image scale, create thumbnail
$thumbResource = resizeImage($imageResource, 500, 500);
$thumbResource = resizeImage($imageResource, $thumb_size, $thumb_size);

imagejpeg($thumbResource, $filename_thumb, $config['jpeg_quality_thumb']);
imagedestroy($thumbResource);
Expand Down
22 changes: 22 additions & 0 deletions api/deletePhoto.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
$file = $_POST['file'];
$filePath = $config['foldersAbs']['images'] . DIRECTORY_SEPARATOR . $file;
$filePathThumb = $config['foldersAbs']['thumbs'] . DIRECTORY_SEPARATOR . $file;
$filePathKeying = $config['foldersAbs']['keying'] . DIRECTORY_SEPARATOR . $file;
$filePathTmp = $config['foldersAbs']['tmp'] . DIRECTORY_SEPARATOR . $file;

// Only jpg/jpeg are supported
$imginfo = getimagesize($filePath);
Expand All @@ -29,6 +31,26 @@
]));
}

if ($config['chroma_keying']) {
if (is_readable($filePathKeying)) {
if (!unlink ($filePathKeying)) {
die(json_encode([
'error' => 'Could not delete keying file',
]));
}
}
}

if ($config['keep_images']) {
if (is_readable($filePathTmp)) {
if (!unlink ($filePathTmp)) {
die(json_encode([
'error' => 'Could not delete tmp file',
]));
}
}
}

deleteImageFromDB($file);

echo json_encode([
Expand Down
11 changes: 10 additions & 1 deletion api/download.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<?php
require_once('../lib/config.php');

$download_thumbs = $config['download_thumbs'];
$image = (isset($_GET['image']) && $_GET['image']) != '' ? $_GET['image'] : false;
if($image) {
$filename_source = $config['folders']['images'] . DIRECTORY_SEPARATOR . $image;

$fullres = $config['folders']['images'] . DIRECTORY_SEPARATOR . $image;
$thumbres = $config['folders']['thumbs'] . DIRECTORY_SEPARATOR . $image;

if ($download_thumbs) {
$filename_source = $thumbres;
} else {
$filename_source = $fullres;
}

header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="photobooth-'.$image.'"');
Expand Down
2 changes: 1 addition & 1 deletion chromakeying.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<div class="chroma-control-bar">
<a class="btn btn--flex" id="save-btn" href="#"><i class="fa fa-floppy-o"></i> <span data-i18n="save"></span></a>

<?php if ($config['use_print']): ?>
<?php if ($config['use_print_chromakeying']): ?>
<a class="btn btn--flex" id="print-btn" href="#"><i class="fa fa-print"></i> <span data-i18n="print"></span></a>
<?php endif; ?>

Expand Down
28 changes: 20 additions & 8 deletions config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,10 @@
$config['show_error_messages'] = true;
$config['auto_reload_on_error'] = true;
$config['pictureRotation'] = '0';
$config['use_print'] = false;
$config['use_qr'] = true;
$config['use_download'] = true;
$config['download_thumbs'] = false;
$config['use_slideshow'] = true;
$config['print_qrcode'] = false;
$config['print_frame'] = false;
$config['print_frame_path'] = '../resources/img/frames/frame.png';
$config['crop_onprint'] = false;
$config['crop_width'] = '1000';
$config['crop_height'] = '500';
$config['use_mail'] = false; // mail data needs to be configured
$config['show_fork'] = true;
$config['previewFromCam'] = false; // experimental see https://github.com/andreknieriem/photobooth/pull/30
Expand All @@ -38,6 +32,7 @@
$config['collage_cntdwn_time'] = '3'; // control countdown timer between collage pictures
$config['cheese_time'] = '1000'; // control time for cheeeeese!
$config['keep_images'] = true;
$config['thumb_size'] = '540px';
$config['image_preview_before_processing'] = true;
$config['preserve_exif_data'] = false;
$config['use_filter'] = true;
Expand All @@ -50,7 +45,10 @@
$config['take_frame'] = false;
$config['take_frame_path'] = '../resources/img/frames/frame.png';
$config['take_collage_frame'] = false;
$config['take_collage_frame_always'] = false;
$config['take_collage_frame_path'] = '../resources/img/frames/frame.png';
$config['collage_layout'] = '2x2'; // possible values are '2x2' or '2x4'
$config['collage_background'] = '../resources/img/frames/DefaultCollageBackground.png';
$config['chroma_keying'] = false;
$config['use_collage'] = true;
$config['continuous_collage'] = true;
Expand All @@ -69,9 +67,10 @@
// use for example https://keycode.info to get the key code
$config['photo_key'] = null;
$config['collage_key'] = null;
$config['print_key'] = null;

// LANGUAGE
// possible values: de, el, en, es, fr
// possible values: de, el, en, es, fr, pl
$config['language'] = 'en';

// StartScreen
Expand Down Expand Up @@ -150,6 +149,19 @@
$config['slideshow_randomPicture'] = true;
$config['slideshow_use_thumbs'] = false;

// PRINT
$config['use_print_result'] = false;
$config['use_print_gallery'] = false;
$config['use_print_chromakeying'] = false;
$config['auto_print'] = false;
$config['auto_print_delay'] = '1000';
$config['printing_time'] = '5000';
$config['print_qrcode'] = false;
$config['print_frame'] = false;
$config['print_frame_path'] = '../resources/img/frames/frame.png';
$config['crop_onprint'] = false;
$config['crop_width'] = '1000';
$config['crop_height'] = '500';
// TEXT ON PRINT
$config['is_textonprint'] = false;
$config['textonprint']['line1'] = 'line 1';
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<a href="#" class="btn mailbtn"><i class="fa fa-envelope"></i> <span data-i18n="mail"></span></a>
<?php endif; ?>

<?php if ($config['use_print']): ?>
<?php if ($config['use_print_result']): ?>
<a href="#" class="btn printbtn"><i class="fa fa-print"></i> <span data-i18n="print"></span></a>
<?php endif; ?>

Expand Down
Loading

0 comments on commit a868b06

Please sign in to comment.