summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-02-01generators: Expose ITEM_INDEX value for non-picture itemsTomas Bzatek1-1/+4
The returned number corresponds with the next picture item ID, for templates to present related information (i.e. section beginning) for the particular picture.
2015-02-01jpeg-utils: Use the nicer unicode "f" for the aperture value stringTomas Bzatek1-1/+1
2015-02-01theming: Introduce image size fallback modeTomas Bzatek3-38/+87
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-02-01jpeg-utils: Add some assertsTomas Bzatek1-0/+8
Users are not really supposed to hit any of them, it would indicate a programmer mistake otherwise.
2015-01-30theming: Fix the have_image_size() nofullsize testTomas Bzatek1-4/+0
The "original" image size presence should not really be reported when the "preview" image size substitutes it due to its absence (not defined in the album XML file).
2015-01-30theming: Implement have_album_image_size() block functionTomas Bzatek1-0/+37
Similar to the have_image_size() block function this is its variation operating over the album. The block condition is true if there's at least one item in the album of the specified image size. Respects the legacy "nofullsize" tags. Takes one mandatory argument of image size name.
2015-01-26block-parser: Don't call the destroy func on NULL user_data pointerTomas Bzatek1-1/+1
2015-01-25theming: Implement have_image_size() block functionTomas Bzatek1-0/+45
This can be used to query image size availability for the current item. While images are normally generated for theme-defined image sizes and thus guaranteed to be available, this function queries if the image of defined size has really been supplied in album XML files. Takes in account the legacy "nofullsize" tags. Takes one mandatory argument of image size name.
2015-01-25block-parser: Enhance block_parser_register_function() with a destroy notify ↵Tomas Bzatek3-16/+25
callback
2015-01-25generators: Rename HAS_ conditionals to HAVE_Tomas Bzatek1-4/+4
... just a matter of personal taste. Note: this breaks the template API only in current unreleased versions.
2015-01-25theming: Make custom image size handling fully flexibleTomas Bzatek6-93/+120
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-11generators: Remove unnecessary picture page global blockTomas Bzatek1-25/+14
Turned out there was no need for having most of the picture page closed in a block.
2015-01-11generators: Allow undefined album image and thumbnail sizesTomas Bzatek1-76/+77
There may be certain cases where images or thumbnails on album pages are not needed and textual representation is just fine. Metadata pulled from the source image files are still processed and exposed.
2015-01-11theming: Make lookup_image_size_for_name() NULL-awareTomas Bzatek1-0/+3
2015-01-11theming: Remove invalid <picture> theme validation checkTomas Bzatek1-5/+1
As per rules defined in the sample default.xml setup file the whole <picture> theme definiton block is not mandatory anymore. The rest of the code plays nicely already.
2015-01-04Introduce new "fixed" thumbnail crop modeTomas Bzatek5-20/+65
This mode retains given aspect ratio and crops the area from inside of the source image.
2015-01-04generators: Newline at the end of generated .htaccess fileTomas Bzatek1-1/+2
2015-01-04generators: Use single function for all templatesTomas Bzatek6-566/+560
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-18generators: Separate common code outTomas Bzatek1-142/+136
2014-09-17theming: Make navigation bar strongly themedTomas Bzatek1-81/+169
Navigation bar can be complex and comprises of several different elements. Until now the navigation bar was almost hardcoded. We needed to separate different types of navigation bar elements: * NAV_BAR_FIRST - the first element, usually denoting gallery root. This element takes priority and is used when there are no other elements in the path. * NAV_BAR_ELEM - normal element used in the path between first and last elements. * NAV_BAR_LAST - ending element, guaranteed there's at least the NAV_BAR_FIRST element before. * NAV_BAR_CURRENT - non-clickable informational element displaying the current page title. Optional, in contrast to the former three defines. * NAV_BAR_CURRENT_ROOT - a special case of the latter one, displayed at the very root page. Also optional, in that case the navigation bar would become empty.
2014-09-15theming: Allow themes to use different thumbnail image sizesTomas Bzatek7-140/+176
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-09-15theming: Verify that the "original" image size is definedTomas Bzatek1-0/+4
Let's make it mandatory for now.
2014-09-15theming: Define meaning of the <no_resize> tagTomas Bzatek1-1/+1
Although probably not very common scenario, let's be consistent across all defined image sizes and clearly state that an explicitly supplied image file for an optional image size should carry the tag in order not to get resized.
2014-09-13Introduce properties tableTomas Bzatek9-131/+581
This is a new internal properties storage for attributes that can be defined both in the item and album scope, with the item scope taking priority. The big advantage is a better distinguishment from an undefined, default value. It also makes easier to retrieve attributes with properly defined scope priorities.
2014-03-22Make error reporting nicer when referenced image is not availableTomas Bzatek2-10/+30
There were lots of errors reported for the same issue recently, let's silence some and only report image copy/resize errors.
2014-03-21Use setup2.xml if presentTomas Bzatek2-5/+11
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 Bzatek4-7/+140
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.
2014-03-18Use "override" terminology instead of "fake"Tomas Bzatek5-47/+47
This is a file format break within development branch.
2014-03-18Ignore zero raw values for Camera Temperature tag detectionTomas Bzatek1-6/+17
Some cameras have the Exif.CanonSi.0x000c tag present but set to zero (raw value). Since this would result in some -128 deg. C, ignore such values.
2014-03-18Allow absolute pathnames for external EXIF dataTomas Bzatek1-2/+2
2014-03-18Add support for specifying custom focal length and apertureTomas Bzatek7-3/+68
Similar to using supplied timestamps this is useful for fully manual lenses that don't provide any information to the camera.
2014-03-15jpeg-utils: Strip all profiles from thumbnailsTomas Bzatek1-0/+2
This removes associated ICC profiles and such, though we should perform proper colorspace conversion to plain (s)RGB first.
2013-06-05jpeg-utils: Shift/fake also Exif.Image.DateTimeTomas Bzatek1-5/+2
Turned out the Exif.Image.DateTime key may contain original timestamp in some cases, e.g. when using extracted EXIF data from original image. Since we can't trust this key has ever been modified by a photo software, let's modify it together with other keys. It comes with a cost of changing correct timestamp but we can't really distinguish that.
2013-04-22Use new glib threading APITomas Bzatek2-1/+7
The gthread library has been merged in glib and the threading API has changed a little. Since changes are negligible, there's no point of losing support of older glib releases, thus make it conditional.
2013-04-09Modernize configure.acTomas Bzatek1-1/+1
https://live.gnome.org/GnomeGoals/ModernAutotools Big thanks to Pavel Raiskup for autoconf hints
2013-04-07Remove unnecessary bitshifting for enum membersTomas Bzatek1-6/+6
2013-04-07Add ability to specify thumbnail square crop hintTomas Bzatek5-17/+92
In simple crop square mode it's sometimes viable to specify position of the square. This is vastly useful for portrait pictures so that you don't crop the head off the body.
2013-04-07Set squared thumbnail crop amount to 0Tomas Bzatek1-1/+1
The 5 percent value (from each side) wasn't really doing any good... Let me know if you actually liked it.
2013-04-07Use rel="home" for links pointing to gallery rootTomas Bzatek1-2/+2
Hopefully some browsers would understand that. http://microformats.org/wiki/existing-rel-values
2013-04-07Tweak commandline arguments descriptionTomas Bzatek1-3/+3
Be more illustrative by highlighting the arguments.
2013-04-07Strip unused template tags by defaultTomas Bzatek5-1/+27
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-17Autodetect number of threadsTomas Bzatek1-2/+22
When number of jobs is not specified, use autodetection of number of processors available in the system. This requires glib-2.35.4, checked during configure. https://bugzilla.gnome.org/show_bug.cgi?id=614930 https://bugzilla.gnome.org/show_bug.cgi?id=687223
2013-03-17Dup exiv2 strings immediatelyTomas Bzatek1-8/+15
Weird things happened to me in the past while debugging, it's like the lifetime of returned const strings is unknown and we can't really rely on them, so let's duplicate them immediately. This will not however fully solve the issue but rather minimizes the risk. Need to investigate what's going on, don't really want to start using mutexes to ensure full thread safety. Moreover we have separate objects in each thread.
2013-03-17Support Iptc.Application2.Digitization{Date,Time} for time shifting and fakingTomas Bzatek1-17/+25
Turned out these two keys are commonly used as well.
2013-03-17Use reentrant versions of datetime functions for thread safetyTomas Bzatek1-27/+30
2013-03-16Strip XMP metadata by defaultTomas Bzatek5-3/+16
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 Bzatek5-2/+26
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-03-16Support IPTC timestamps when shifting or fakingTomas Bzatek1-19/+99
There are more date-related IPTC tags in the specs but so far I haven't seen anything else than Iptc.Application2.{Date,Time}Created
2013-03-10Add support for specifying custom dateTomas Bzatek5-35/+135
This essentially means faking the datetime, e.g. when you want to mask original picture date. This commit also changes little bit of datetime conversion, hopefully fixing DST issues. Needs more testing.
2013-03-10Add support for datetime/timezone shiftTomas Bzatek5-36/+215
Simple datetime shift, including EXIF data modification.