summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2025-06-08build: Fix libxml2 includesTomas Bzatek1-1/+2
2021-01-15fluid: Rework index item thumbnailsTomas Bzatek2-5/+22
Even the recent Firefox still doesn't support the background-image:image-set CSS styles for HiDPI thumbnails. Rework this to a regular image placed inside the <a> tag.
2021-01-15fluid: CSS gradient fixesTomas Bzatek1-28/+28
As pointed out by the CSS validator.
2021-01-15fluid: Use https for external font resourcesTomas Bzatek1-2/+2
2021-01-15fluid: Add workaround to disable initial transitions on page loadTomas Bzatek2-0/+7
Although this may look weird on a first sight it does the trick. Perhaps as a result of another bug in recent Webkit-based browsers, still good enough for the time being.
2021-01-15fluid: Rounded borders for album imagesTomas Bzatek1-1/+3
2021-01-15fluid: Use box-shadow for index item bordersTomas Bzatek1-12/+8
Fractional HiDPI scaling (1.5x) on newer Webkit-based browsers tend to cause extra black borders around the index item thumbnails due to rounding error. Turned out borders created by CSS box-shadow are rendered differently and less prone to rounding errors. Though this way of border rendering is slightly different but generally more acceptable.
2021-01-15fluid: Set thumbnail size to an even valuesTomas Bzatek2-2/+2
Odd base image sizes are a real problem for fractional scaling (HiDPI 1.5x).
2021-01-15fluid: Set default link colour before loading the common CSS fileTomas Bzatek3-24/+28
Recent Webkit-based browsers tend to animate link colour from builtin one (blue) once the common CSS stylesheet file gets loaded, resulting in unwanted animation. So set a sane default color within the HTML files so that the animation goes unnoticed. Still would be great to disable initial transitions altogether.
2019-09-20generators: Force even base image dimensions for fractional HiDPI sizesTomas Bzatek3-12/+34
In case a dimension of the base image is not even and fractional HiDPI size is to be generated, the resulting image size computes to a non-integer values. Rounding in browsers may vary so let's stick with safe values and force even base image dimensions. This may result in slight crop applied before resize, generally imperceptible. Tested on Chromium 69 and Firefox 52.
2019-05-13jpeg-utils: Don't override Exif.CanonSi.ApertureValueTomas Bzatek1-2/+0
Newer exiv2 versions don't like it. Sadly this will fail whole metadata write, stating plain "Failed to write image" error.
2019-05-13Plug some memory leaksTomas Bzatek3-2/+8
2019-05-13jpeg-utils: Port to gexiv2Tomas Bzatek4-483/+345
The gexiv2 library is just a GObject wrapper around exiv2 library. It's a healthy project that continually keeps up with exiv2 API changes. Adopted by e.g. GIMP there's certain guarantee of future maintenance. This allows us to get rid of C++ code, making it more readable and predictable.
2019-05-11build: Fix minor compiler warningsTomas Bzatek7-14/+15
2019-05-11build: Split libraries detectionTomas Bzatek2-44/+37
Includes some automake files cleanup and enables extra compiler warnings.
2019-05-11templates/fluid: Disable index items dimming/highlight on hoverTomas Bzatek1-9/+2
Let the album thumbnails shine, no need to dim them as we really want to present the albums.
2018-12-15theming: Add option to disable HiDPI for any particular image sizeTomas Bzatek2-1/+8
Useful for 4k size where additional HiDPI sizes (i.e. 6k and 8k) are overkill to generate and aren't very common on the market yet.
2018-12-15templates/fluid: Add 4k sizeTomas Bzatek2-0/+15
Suitable for >30" native 4k screens with no scaling.
2018-12-15templates/fluid: Tweak image sizesTomas Bzatek2-11/+11
Tested on various common resolutions with standard browser and system toolbars.
2018-12-14jpeg-utils: ImageMagick 7 adaptationsTomas Bzatek2-1/+15
MagickWand comes with a couple of incompatible API changes in version 7.
2018-12-14jpeg-utils: Fix ImageMagick includesTomas Bzatek1-1/+1
Thanks to Sebastian Pipping for nagging me loudly about this!
2017-05-07jpeg-utils: Allow custom datetime formatTomas Bzatek6-2/+14
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-18generators: Take the optional shave amount in account for dimension calculationTomas Bzatek1-0/+7
2016-10-04items: Add option to shave image bordersTomas Bzatek5-1/+14
A workaround for badly exported images that contain some garbage at the borders. The amount specifies how many pixels should be shaved from all borders (i.e. amount of 2 results in 4x4 pixels loss). Applicable for particular items or whole album (<general> section) with the following syntax: <shave amount="1" />
2016-10-02Add support for HiDPI imagesTomas Bzatek8-79/+266
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-02generators: Don't read EXIF data for all image sizesTomas Bzatek1-1/+1
EXIF data were read in cases where weren't even used.
2016-10-02jpeg-utils: Add support for custom resize optionsTomas Bzatek8-12/+185
This change brings the possibility to tweak resize options using standard ImageMagick `convert` command syntax. Separate options are offered for thumbnails.
2016-09-23generators: Make image quality threshold inclusiveTomas Bzatek1-1/+1
(95% + 5% threshold == 100% source image quality acceptance)
2016-09-23fluid: Use CSS media queries to determine displayed image sizeTomas Bzatek3-68/+45
This is a huge step forward in terms of usability and simplicity. Image sizes are now determined by browser automatically based on window width. As a result the image size switch buttons have been removed and only a single page is generated (index.html). Note: in order to make image title, description and EXIF table dynamically aligned to the image width, "display: table" and relatives were used. This may not be the best webdesigner practice but it's an effective and sufficient approach for the moment.
2016-09-23generators: Expose all image sizesTomas Bzatek1-12/+55
A new block LIST_PICTURE_ALL_SIZES has been introduced to expose all available image sizes when iterating through the album items. Image size availability can be tested by the HAVE_IMG_SIZE_xxx define where "xxx" is an upper-case image size name as defined in the theme XML file. Similarly the image standard tags IMG_SIZE_W__xxx, IMG_SIZE_H__xxx and IMG_SRC__xxx have been introduced as well.
2016-09-19block-parser: Clear processed data for further useTomas Bzatek3-3/+37
This change will allow certain blocks to be present multiple times and processed independently within a single page.
2016-09-18Introduce resizing thresholdsTomas Bzatek9-184/+301
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 explicit references to "original" and "preview" image sizesTomas Bzatek3-46/+42
All image sizes are now equal, no special treatment (except of thumbnails).
2016-09-17Drop legacy nofullsize and album width/height/quality tagsTomas Bzatek9-151/+45
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 Bzatek3-3/+12
This adds commandline argument --debug-warn-resize that is useful for debugging image resizing, particularly for detecting unintended supplied image resizes.
2016-09-11atom-writer: Use _DEFAULT_SOURCE instead of deprecated _BSD_SOURCETomas Bzatek1-1/+1
Needed for struct tm.tm_gmtoff
2016-04-03cgg-dirgen: Support the 'hires' image sizeTomas Bzatek1-0/+13
Used by the new fluid theme.
2016-04-03Switch the sample gallery to the new fluid themeTomas Bzatek2-2/+2
2016-04-03New 'fluid' themeTomas Bzatek12-1/+1443
Introducing a modern looking theme that changes gallery philosophy a bit. Instead of having thumbnails on an album page and photos on separate pages this new design brings emphasis on story telling. Viewer is advised to go through the whole album sequentially, bringing atmosphere to the whole set. All photos are loaded within a single page and keyboard navigation via left/right arrows is supposed to be used to switch the presentation mode on. Three photo sizes are supported now with the 'preview' size being the default. High resolution size has been introduced for 2560x1440 screens and larger. Note that this template uses code from 3rd parties, see CREDITS for details. I haven't been able to contact anyone behind the TheCodePlayer.com project so licensing of the breadcrumbs might be an issue.
2016-04-03jpeg-utils: Override artist and owner nameTomas Bzatek8-0/+37
Useful to override previous camera owner name stored in EXIF.
2016-04-03gallery-utils: Copy extra files recursivelyTomas Bzatek3-2/+44
This brings support for copying whole directories when specified in album extra files or template supplemental files.
2015-08-29jpeg-utils: Unify media libraries initializationTomas Bzatek3-6/+30
Both MagickWand and exiv2 needs some initialization and cleanup, move it to jpeg-utils for clean includes in cgg.c. Also add explicit exiv2 XMP initialization as stated on http://dev.exiv2.org/projects/exiv2/wiki/Thread_safety: "The XMP SDK initialization function is not mutex protected, thus Exiv2::XmpParser::initialize is not thread-safe. Therefore, multi-threaded applications need to ensure that this XMP function is serialized, e.g., by calling them from an initialization section which is run before any threads are started." See also https://bugs.kde.org/show_bug.cgi?id=166424
2015-08-29setup: Fix setup files version checkTomas Bzatek1-3/+3
Logical issue, found by a gcc-5.2.0 warning.
2015-08-29jpeg-utils: Filter out certain tags from external EXIF fileTomas Bzatek2-1/+82
Turned out that we shouldn't blindly copy all metadata from the supplied external EXIF file since they belong to a different image. This includes image size, JPEG compression parameters, rotation etc. This commit adds tag filtering so that not all tags are copied, retaining the important ones from the gallery image. The list of retained tags is by no means complete and is subject to future tweaks. For the moment this feature is recommended to be turned off (and is by default).
2015-02-01theming: Fix thumbnail sizes validationTomas Bzatek1-2/+5
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-01Move the current design templates in the "classic" subdirTomas Bzatek11-14/+19
Let's call this design a "classic" one.
2015-02-01theming: Introduce image size fallback modeTomas Bzatek4-41/+97
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.