Skip to content

Releases: girder/django-large-image

Utilize rasterio

29 May 22:31
Compare
Choose a tag to compare

large-image recently introduced a new rasterio-based source module which many users may find easier to use than the GDAL source module. The changes in this release make django-large-image compatible with the new rasterio source module and switch the testing/demo to use that module over GDAL.

Modern UI, Django Caching, Better Styling, API Cleanup, & more

17 Jun 16:41
Compare
Choose a tag to compare

New Features

Notable

  • Major UI overhaul
    • Copy metadata button
    • Modern UI styling
    • Advanced multi-band compositing with custom colors
  • Connects large-image's caching mechanisms to utilize the Django cache framework
    • Specify the named cache as the LARGE_IMAGE_CACHE_NAME, otherwise uses the 'default' cache
  • New tiffdump endpoint utilizing tifftools to extract information from Tiff files
  • Support for URI encoded styles in request URL parameters (documented in README)
  • Improved internal mechanisms for opening tile sources for easier overrides downstream
    • User can specify the source class to use through the source URL parameter
  • Better format handing for endpoints that serve image data (single endpoint where PNG, JPEG, or TIFF are specified for the desired format)

Additional

  • Support max_width and max_height specification for generating thumbnails
  • Improvements to SSR template overriding
  • mypy type annotations throughout API
  • New TileMetadataSerializer for the tiles/metadata endpoint
  • Improved API error handling
  • Better OpenAPI RESTful arguments documentation

Demos

Deprecations & Changes

  • internal_metadata -> metadata_internal
  • Metadata endpoints are now under the info/ prefix
    • e.g., metadata -> info/metadata
  • Data endpoints are now under the data/ prefix
    • e.g., thumbnail.png -> data/thumbnail.(?P<fmt>png|jpg|jpeg)

Better ViewSet Mixins

10 Apr 21:18
Compare
Choose a tag to compare

This release has breaking changes

There are now 4 ViewSet mixin classes for use with both detail and non-detail viewsets in DRF.

The following are the provided mixin classes and their use case:

  • LargeImageMixin: for use with a standard, non-detail ViewSet. Users must implement get_path()
  • LargeImageDetailMixin: for use with a detail viewset like GenericViewSet. Users must implement get_path()
  • LargeImageFileDetailMixin: (most commonly used) for use with a detail viewset like GenericViewSet where the associated model has a FileField storing the image data.
  • LargeImageVSIFileDetailMixin: (geospatial) for use with a detail viewset like GenericViewSet where the associated model has a FileField storing the image data that is intended to be read with GDAL. This will access the data over GDAL's Virtual File System interface (a VSI path).

Most users will want to use LargeImageFileDetailMixin

Other changes:

  • Style parameters can now be included as a JSON blob in the request body following the format specified by large-image
  • The thumbnail, tile, and region endpoints now each have .png, .jpeg, and .tif variants where appropriate
  • DRF ValidationErrors are raised for user-caused API errors (return 400 status on endpoint)
  • More usage examples

Introducing django-large-image

02 Apr 00:44
Compare
Choose a tag to compare

django-large-image is here to solve your image tile serving needs in Django! Take a look at the README for some example implementations and give it a try in your project with image data.

Highlights

  • Easy to use mixin interface
  • Rich set of RESTful endpoints to extract information from large image formats
  • Serve image tiles in the slippy maps standard (z/x/y.png)
  • Produce thumbnails of large images on the fly
  • Works with FileField interfaces
  • Works with URL files (through GDAL's VFS/VSI layer)
  • Included viewer for admin interface or server-rendered templates
  • OpenAPI documentation included

admin