summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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.
2013-02-10Show note for password protected albums on index pagesTomas Bzatek1-0/+1
Also adds IS_PROTECTED define in local item scope.
2013-02-10generators: Process image blocks through local block parsersTomas Bzatek3-44/+42
This change allows using local defines related to each item in the album or index page.
2013-02-10block-parser: Don't process conditionals when retrieving block dataTomas Bzatek1-4/+20
This allows us to retrieve unmodified block data that could be used for conditional processing later.
2013-02-10Support theme-defined thumbnail for protected albumsTomas Bzatek5-35/+102
2012-12-31atom-writer: Check fclose() resultTomas Bzatek1-1/+2
Errors may very well appear on file closing. TODO: Go through all other file writes and add more checks.
2012-12-31Add support for password protected albumsTomas Bzatek5-0/+140
This adds support for simple password protected areas (albums and all subalbums) through webserver HTTP authentication. CGG simply generates .htaccess and password files and it's up to the user to set up the rest on server side. No UI changes at this point. Limited to one user per album for the moment.
2012-12-30setup: Introduce location section and reorganizeTomas Bzatek4-7/+14
More and more we need to know local and public locations for various features. Let's introduce general keys once and for all.
2012-12-27jpeg-utils: Tidy up get_exif_data_fixed() a bitTomas Bzatek1-26/+17
And change g_str_has_prefix() for key name comparison to g_str_equal() to prevent potential prefix clashes.
2012-12-27jpeg-utils: Use Exiv2::Exifdatum.count() for key presence testTomas Bzatek1-6/+2
2012-12-27Add support for EXIF Canon Camera temperatureTomas Bzatek2-0/+41
For the moment we're using Exif.CanonSi.0x000c key from Exiv2 namespace since it's an unknown tag to it. This may need little tweaking in the future when proper naming becomes upstream.
2012-12-27Support external EXIF metadataTomas Bzatek4-3/+31
This brings an ability to specify external file to read EXIF/IPTC data from. The motivation was to work around RAW editors randomly stripping some EXIF blocks.
2012-12-25cgg-dirgen: Fix some bashismsTomas Bzatek1-3/+3
2012-12-24Add has_exif_key() block functionTomas Bzatek1-0/+13
Simple check whether the EXIF/IPTC key is available for the current image. Precisely one argument is required, similar to the get_exif_value() custom function, an Exiv2 metadata attribute string is expected. This allows templates to change behaviour when certain metadata key is not present (e.g. don't print the particular table line at all).
2012-12-24block-parser: Relaxed endif()/else() syntax for custom block functionsTomas Bzatek1-4/+30
Specifying all arguments in endif() or else() for custom block functions reduces code readability and debugging comfort. Let's be less strict and don't require them. A simple test for function name should be enough, moreover nesting is not limited by this change at all.
2012-12-24block-parser: Add support for custom block functionsTomas Bzatek4-30/+128
Similar to replace-table custom functions, this brings an ability to register custom block functions that can be called from templates with variable arguments. The syntax is as follows: <!-- $(if (function_name(arg1, "arg2", 'arg3'))) --> ... <!-- $(endif (function_name(arg1, "arg2", 'arg3'))) --> An optional exclamation mark before the function name reverts the result (negates) the predicate. This allows template flexibility with respect to the currently processed image.
2012-12-01Use single glib.h includeTomas Bzatek1-1/+0
Please shout if it breaks compilation against older glib versions
2012-04-16block-parser: Allow indented token argumentsTomas Bzatek3-6/+30
Some of us like to have indented arguments from a function name.
2012-04-15Add HAS_EXIF defineTomas Bzatek3-0/+45
This brings a new HAS_EXIF define which is present when EXIF information are available. Templates have been modified to inform user when not available. The test for EXIF metadata presence is fairly basic, we only look for aperture, focal length and exposure time attributes. This might be a subject to change in the future.
2012-04-15Change EXIF metadata handling into a registered functionTomas Bzatek3-233/+216
This allows much greater flexibility from templates regarding EXIF metadata handling, no more hardcoded symbols. It's possible to display essentially any attribute known to Exiv2. Please see http://exiv2.org/metadata.html This brings two new functions that can be called from templates: * get_exif_value (exiv2_attribute) * get_exif_value_fixed (exiv2_attribute) Both functions take a string argument of metadata attribute name from Exiv2 namespace. The difference is that get_exif_value_fixed() does some extra formatting for several basic attributes (e.g. datetime format).
2012-04-15replace-table: Add support for custom functionsTomas Bzatek2-0/+159
This adds a support for custom (registered) functions that can be called from templates with specified arguments. The syntax is as follows: <!-- $(function_name(arg1, "arg2", 'arg3')) --> Arguments are separated by a comma and can be quoted (recommended). Quoted arguments are allowed to contain a comma as well as another quote when escaped with a backslash. To call a function with no arguments just do "function_name()". Functions are supposed to be registered before actual data are parsed and are called back from within the parser cycle.