summaryrefslogtreecommitdiff
path: root/src/setup.h
AgeCommit message (Collapse)AuthorFilesLines
2017-05-07jpeg-utils: Allow custom datetime formatTomas Bzatek1-0/+1
The default locale datetime format string may not suit everyone, this adds possibility to specify custom format. The format string should be syntactically conforming to strftime(3).
2016-10-02Add support for HiDPI imagesTomas Bzatek1-2/+12
This works by creating corresponding hidpi image sizes on startup and letting the machinery generate high resolution images from the source images (no way to use supplied images). However since browsers expect exact image dimension multiples for the particular scale factor, a reference image size (scale factor 1.0x) must be read first, then cropped to match reference aspect ratio and resized to exact dimensions. That way pixel-perfect results can be achieved for the chosen scale factor. TODO: the CSS background-image: image-set() tags are not supported on Firefox. TODO: try the 1.5x scale factor
2016-10-02jpeg-utils: Add support for custom resize optionsTomas Bzatek1-0/+2
This change brings the possibility to tweak resize options using standard ImageMagick `convert` command syntax. Separate options are offered for thumbnails.
2016-09-18Introduce resizing thresholdsTomas Bzatek1-1/+7
This commit brings deeper changes to the image sizes concept. The goal was to allow more flexible input in resizing vs. supplied files mixed mode. Instead of hard <noresize> flags the decision whether to resize or copy an image is now based on threshold. While not 100% universal, it brings more control regarding image size bounds. Also brings a level of tolerance for specific errors (off-by-one exports). Image sizes' rules are a bit simpler, hopefully easier to understand. A lot can be achieved by combination of thresholds.
2016-09-17Drop legacy nofullsize and album width/height/quality tagsTomas Bzatek1-2/+0
This drops the legacy functionality that doesn't really fit into the new flexible design concept and makes code unnecessarily complicated. Most of these overrides affected only the "preview" image size anyway. This also makes the <item src> attribute mandatory as it's being the only source of metadata (unless overriden or supplied externally). This unfortunately breaks the so-far 100% album XML files compatibility.
2016-09-11generators: Optionally warn when an image is being resizedTomas Bzatek1-0/+1
This adds commandline argument --debug-warn-resize that is useful for debugging image resizing, particularly for detecting unintended supplied image resizes.
2016-04-03jpeg-utils: Override artist and owner nameTomas Bzatek1-0/+1
Useful to override previous camera owner name stored in EXIF.
2015-08-29setup: Fix setup files version checkTomas Bzatek1-3/+3
Logical issue, found by a gcc-5.2.0 warning.
2015-02-01theming: Introduce image size fallback modeTomas Bzatek1-0/+1
This changes image size handling a little bit. An optional <fallback size="xxx" /> tag tells the generator to use different image size when an image for the current image size has not been supplied from the album XML file. This is effectively used for the legacy <nofullsize> tag fallback. More generally this is useful for templates showing additional image sizes. Also saves space as images not having the custom size supplied are not generated from the source image.
2015-01-25theming: Make custom image size handling fully flexibleTomas Bzatek1-0/+1
This commit brings full flexibility of custom image size definition and usage. When a custom image size is defined, it automatically maps to the album <item> tag arguments. Alternatively, this automatic name matching can be overriden by <size tagname="..."> theme setup tags. This allows us to supply image of different sizes that can be also used in templates. Legacy behaviour of "fullsize" and "preview" image size fallback is retained (though not recommended in new theming setups).
2015-01-04Introduce new "fixed" thumbnail crop modeTomas Bzatek1-1/+8
This mode retains given aspect ratio and crops the area from inside of the source image.
2015-01-04generators: Use single function for all templatesTomas Bzatek1-1/+1
This commit makes use of a common function for all template parsing and page writing. The behaviour is controlled by the "item" argument passed in. This allows us to have a single code that generates code for list of items as well as for a single item. In the future, this can be used for e.g. combining thumbnails and large images on the same page. Other than that this commit also brings several other changes: - further clarification of theming setup XML file - <protected_thumbnail> tag has been moved out of the <album> structure into the <index> structure where it functionally belongs. Only whole albums can be protected and the substitute thumbnail is displayed on index pages. - position marker format has been broken out to a constant - added few more FIXMEs to mark places that will change soon - some template variables have been renamed
2014-09-15theming: Allow themes to use different thumbnail image sizesTomas Bzatek1-8/+10
This change makes thumbnail image sizes more flexible by explicitly stating the particular image size is a thumbnail. And each thumbnail image size can have different squared settings. On the theme side it's now mandatory to specify which thumbnail size to use (if applicable). This allows us to have different thumbnail styles for index and album pages. This commit also removes the <squared_thumbnails> tag from setup.xml file but retains fallback for ver. 1 setup.xml files.
2014-03-21Use setup2.xml if presentTomas Bzatek1-0/+1
To allow combined use of different cgg versions, user may provide ver. 2 setup.xml file that takes priority over standard setup.xml file. This applies only to current working directory, not the files placed in ~/.cgg or distributed as $PREFIX/share/cgg.
2014-03-21Make setup files versioned and add fallback for old versionsTomas Bzatek1-0/+11
This commit makes setup files (setup.xml and referenced design setup xml file) versioned and adds checks for correct versions. If a newer versioned file is detected, warning is printed out in assumption that a stray cgg version is used. If the version information is missing or is lower than expected version, files are read in legacy mode. Some values are left on defaults and missing mandatory values are either read from renamed keys or made up to suit current requirements. This essentially brings back compatibility with old setup.xml files that are usually part of galleries. However, some values are hardcoded and should be kept in mind to update and test the legacy mode along with future enhancements.
2013-04-07Strip unused template tags by defaultTomas Bzatek1-0/+1
If there's a tag defined but not used on replace table processing, this option determines whether it should be written in the generated file or ignored completely. Turned on by default, this will save a few bytes. Use commandline option '--debug-dont-strip-unused-tags' to turn it off, e.g. when debugging template files.
2013-03-16Strip XMP metadata by defaultTomas Bzatek1-0/+1
Some RAW editors like Adobe products like to include XMP data. Let's strip them all off (unless disabled).
2013-03-16Add support for writing external EXIF metadata back to imagesTomas Bzatek1-0/+1
Turned off by default, this will copy all data from supplied external EXIF metadata file back to all generated image files. All user overrides are still applied on top of it. Another reason for turning this off is file size concern, target image files would carry a lot more information that may not be always needed and would increase total amount of data transferred.
2013-02-10Support theme-defined thumbnail for protected albumsTomas Bzatek1-0/+1
2012-12-30setup: Introduce location section and reorganizeTomas Bzatek1-1/+4
More and more we need to know local and public locations for various features. Let's introduce general keys once and for all.
2011-06-04Autorotate images according to EXIF Orientation infoTomas Bzatek1-0/+1
This comes with a cost of decoding full image when only getting image size.
2011-06-04Port Go Up link to the new defines systemTomas Bzatek1-1/+0
2011-06-04Port EXIF table visibility switch to the new defines systemTomas Bzatek1-1/+0
2011-06-04Port border style to the new defines systemTomas Bzatek1-1/+0
This change allows greater flexibility for separate themes.
2011-06-04Introduce conditional systemTomas Bzatek1-0/+1
This is very basic scripting support - simple value retrieval and block conditionals. Defines could be either static from theme setup or programatically added during page generation.
2011-05-29Introduce new theming systemTomas Bzatek1-48/+77
This extends current templating system to another dimension, bringing the possibility to have multiple themes generated at once. The purpose is to be able to switch between multiple designs, from PC to mobile, classic vs. flat view, slideshow, etc. For the moment, only the classic theme is available. Rules: * for switching between themes, place a link inside your template manually - it's not a cgg concern, only your theming infrastructure * don't forget to define different file names for index and album pages across different themes * it's recommended to keep default theme named as "index.*" to avoid showing directory listing on webserver Notes: * some TODOs will be fixed when we have new theme using these advanced features (e.g. pictures in album pages) * TODO: introduce tag/block conditional system, allow custom user defines for each theme/page * TODO: deprecate <show_go_up>, <show_exif_table> and <border style> in favor of conditionals (these tags belong to theming)
2010-12-12Cleanup header definesTomas Bzatek1-5/+8
2010-12-12setup: Code cleanupTomas Bzatek1-2/+2
2010-10-09Add support for squared thumbnailsTomas Bzatek1-0/+7
Disabled by default, only very simple center crop implemented. The SQUARED_SIMPLE_SHAVE_AMOUNT constant may be slightly adjusted according to future experience. It's a really dumb algorithm which may not be suitable for every picture. Looking for a fast and smart algorithm to determine image weight center and radius, i.e. focus on object of interest. The OpenCV's face recognition features are worth to test and consider, though I fear the speed issues.
2010-10-08Add basic Atom feed writerTomas Bzatek1-0/+6
2010-07-22Add option to generate full gallery, overriding the nofullsize switchTomas Bzatek1-0/+1
This option takes the highest priority
2009-05-10Consolidate data typesTomas Bzatek1-24/+24
2009-04-25Custom thumbnail file name formatTomas Bzatek1-0/+2
2009-04-25Update modeTomas Bzatek1-0/+1
By doing update, cgg will check the output structure for missing files and re-generate them as necessary. The decision whether an item (file, picture, album) needs to be updated is done by comparing timestamps (mtime specifically). Due to that reason it's important to keep this fact in mind when replacing single image which carries older timestamp than other files. Either don't use the update mode or 'touch' that new file. Changes made to any XML file will result in whole album re-generation (excluding subalbums).
2009-04-11User customizable image directoriesTomas Bzatek1-3/+6
2009-03-28Support for custom index file nameTomas Bzatek1-0/+2
Affects every generated HTML file (i.e. all of them would have .php extensions)
2009-03-14Option to hide EXIF table in single photo viewTomas Bzatek1-0/+1
2009-03-14Option to hide "Go Up" linksTomas Bzatek1-0/+1
2009-03-14Support for common supportfiles rootTomas Bzatek1-0/+1
2009-03-14Make theming more flexibleTomas Bzatek1-2/+1
Template support files (CSS, images, scripts) are now a list instead of hardcoded single CSS and single script file
2009-03-07Favicon supportTomas Bzatek1-0/+3
2009-02-27Merge cgg-config.hTomas Bzatek1-0/+10
2009-02-26AutotoolizeTomas Bzatek1-0/+92