summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-image.c
Commit message (Collapse)AuthorAgeFilesLines
* Use the SPDX-License-Identifier in all source filesRichard Hughes2019-02-091-15/+1
|
* Add object type checks on the inputs of all functionsRobert Ancell2018-06-271-0/+29
|
* trivial: Do not reallocate all the AsImage URL stringsRichard Hughes2018-05-211-0/+7
|
* Add AS_IMAGE_LOAD_FLAG_ALWAYS_RESIZE to always resize the pixbufRichard Hughes2018-03-091-0/+11
| | | | This will of course make it look blurry in most cases.
* Fix the arithmetic when fitting an image in 16:9Joaquim Rocha2017-11-101-1/+3
| | | | | | | | | | | | When saving a 16:9 pixbuf and the image parameter is not 16:9 we create a transparent pixbuf with this ratio and fit the image in it. However, this calculation was not correctly done due to an integer division so the result is that the width/height of the pixbuf's area to be copied was bigger than what the dimensions of the pixbuf; so no image was copied and we'd be left with a trasnparent pixbuf. This patch fixes this problem by using multiplications instead of a division in the mentioned code (as they avoid imprecision problems).
* trivial: Fix up several small memory leaksRichard Hughes2017-06-221-5/+7
|
* Fix compile with -Wdiscarded-qualifiersRichard Hughes2017-03-151-2/+2
| | | | Some distros helpfully force this on for some reason.
* Allow loading application XPM iconsRichard Hughes2017-01-041-0/+1
| | | | | | | | | Ignoring XPM icons made sense as a way of ignoring unmaintained applications before AppData files were mandatory. Now we have the latter we should load valid application XPM icons if they are large enough for the builder tests. Some package maintainers were just converting the icons at package build time to just avoid the veto.
* Use refcounted strings in all objectsRichard Hughes2016-11-211-30/+26
| | | | | This drops the RSS by ~1Mb and has the potential to do much more drastic things if this is used in GNOME Software.
* Add two new GCC warnings and fix up signed/unsigned issuesRichard Hughes2016-07-251-59/+56
|
* trivial: Get rid of useless internal-only gtk-doc markupRichard Hughes2016-06-281-12/+0
|
* Add as_screenshot_get_image_for_locale()Richard Hughes2016-04-191-1/+44
| | | | | | The AppStream specification has recently added the ability to have translated screenshot images. To support this add new methods to restrict the AsImage selection to compatible locales.
* Implement DEP-11 MediaBaseUrl supportRobert Ancell2016-03-041-2/+10
|
* Only load supported icon kinds when using appstream-composeRichard Hughes2016-01-221-0/+23
|
* Add as_image_load_filename_full()Richard Hughes2016-01-211-24/+152
| | | | This makes it possible to resize icons from libappstream-glib
* Make the check for screenshot equality more robustRichard Hughes2016-01-171-0/+37
| | | | This avoids us exporting multiple screenshots when reusing metadata.
* Use g_set_object() to fix potential crash when adding pixbufsRichard Hughes2015-09-231-6/+2
|
* trivial: Drop as-cleanup.h include where not neededKalev Lember2015-09-081-1/+0
|
* Use GLib's cleanup functions instead of libgsystem'sKalev Lember2015-09-081-5/+5
| | | | | | | We still have a few types that don't support g_autoptr(), but very very close to having everything ported over. This also bumps gdk-pixbuf dep to 2.31.5 for the cleanup macro support.
* libappstream-glib: Port to G_DECLARE_DERIVABLE_TYPE macroKalev Lember2015-09-081-3/+2
| | | | ... and bump glib dep to 2.44.0 for the macro.
* Drop the unused _len arguments on many functionsRichard Hughes2015-08-031-4/+4
| | | | | | Using the length of -1 for 'unknown' breaks the GIR-generated bindings. This breaks API and ABI and the soname has been updated to reflect this.
* Always upscale screenshots if they are too smallKalev Lember2015-03-251-15/+0
| | | | | | After discussing screenshot scaling with jimmac, the designer guidance was that slightly blurry, upscaled images look better than unscaled images that have uneven weird borders.
* Create a AsNodeContext object for parsing stateRichard Hughes2015-01-211-4/+8
| | | | | | | We've relied on version number heuristics for too long, and now we're in a position where we need the source kind to parse files correctly. All the functions are private, no API bump required.
* Assume <image>foo</iimagemg> is a source image kind for AppData filesRichard Hughes2014-12-191-1/+3
| | | | | | | It doesn't make sense to have type="source" for AppData files as they are all of type SOURCE, so just assume this is the default. This fixes screenshots for any package using v0.6+ AppData files.
* trivial: Don't show warnings when doing distcheckRichard Hughes2014-11-041-1/+1
| | | | | It seems that the compiler really does require an initializer when using the _cleanup_ macros.
* Add BLUR and SHARPEN values for AsImageSaveFlagsRichard Hughes2014-10-241-3/+10
| | | | | The latter will allow us to show a blurred small resolution loading screenshot in gnome-software.
* trivial: Do not print a critical warning when saving a pixbug that's not setRichard Hughes2014-10-231-0/+4
|
* Use libyaml to read DEP-11 metadataRichard Hughes2014-08-201-0/+31
| | | | | This is optional, but enabled by default. Use --disable-dep11 to remove the libyaml dependancy.
* trivial: Fix various GObject Introspection markup problemsRichard Hughes2014-08-061-0/+2
|
* trivial: Fix a tiny memory leak when calling as_image_load_filename() more ↵Richard Hughes2014-07-081-0/+1
| | | | than once
* Allow calling as_image_set_pixbuf() with a NULL pixbufRichard Hughes2014-07-081-1/+5
|
* trivial: Never report padding on images with no alpha channelRichard Hughes2014-07-041-0/+3
|
* Add as_image_get_alpha_flags()Richard Hughes2014-07-041-0/+142
| | | | We'll use this to detect funky images in the validator.
* trivial: Do not leak memory if the screenshot is smallRichard Hughes2014-07-031-0/+1
|
* Never sharpen or scale images exactly the correct sizeRichard Hughes2014-07-031-1/+5
|
* Sharpen resized screenshots after resizing with a cubic interpolationRichard Hughes2014-07-031-4/+7
| | | | | | | | We do this at generation time, as applying kernels to many screenshots in the application would be slow. The math has been taken from an old version of the GThumb project, and I've added Paolo to the copyright in the as-utils.c file.
* Never scale up small screenshotsRichard Hughes2014-07-021-1/+14
|
* trivial: Fix up some GObjectIntrospection markupRichard Hughes2014-06-201-1/+1
|
* Allow as_node_get_attribute_as_int() to parse negative numbersRichard Hughes2014-06-131-2/+2
| | | | | | | | | This was failing as the gint64 value was being pushed into a guint64, so negative numbers were being pushed above G_MAXINT and hence an error was being returned. Additionally, return G_MAXINT rather than G_MAXUINT, else we can't actually parse the '-1' value.
* trivial: Use systemd-style cleanup functionsRichard Hughes2014-06-041-5/+5
| | | | There's no point creating yet another format...
* trivial: Use a common style where the _cleanup is done last in the blockRichard Hughes2014-06-031-2/+2
|
* Use __attribute__(cleanup) to simplify memory cleanupRichard Hughes2014-06-011-32/+16
|
* Add as_image_get_basename()Richard Hughes2014-05-161-0/+43
|
* Add as_image_save_pixbuf()Richard Hughes2014-05-161-40/+63
|
* Add as_image_load_filename()Richard Hughes2014-05-141-0/+47
|
* Update the image size when using as_image_set_pixbuf()Richard Hughes2014-05-141-0/+2
|
* Add as_image_get_md5()Richard Hughes2014-05-131-0/+27
| | | | This is not supposed to be a secure hash.
* Add as_image_save_filename()Richard Hughes2014-05-131-0/+87
|
* Add as_image_set_pixbuf()Richard Hughes2014-05-131-0/+38
| | | | This allows us to store image data in the object directly.
* Add an 'api-version' property to AsStore to generate old-style metadataRichard Hughes2014-03-201-1/+2
| | | | | This allows us to keep up with the latest API and still write metadata compatible with old applications not using libappstream-glib or libappstream.