[Git][debian-gis-team/mapcache][bullseye-backports] 6 commits: New upstream version 1.12.1
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Wed Mar 30 05:53:26 BST 2022
Bas Couwenberg pushed to branch bullseye-backports at Debian GIS Project / mapcache
Commits:
26d8bd98 by Bas Couwenberg at 2022-03-24T16:28:15+01:00
New upstream version 1.12.1
- - - - -
9ae744f5 by Bas Couwenberg at 2022-03-24T16:28:19+01:00
Update upstream source from tag 'upstream/1.12.1'
Update to upstream version '1.12.1'
with Debian dir b2bcbbdd4ae93527d1053dc784db806349051f4e
- - - - -
bd1c288b by Bas Couwenberg at 2022-03-24T16:30:08+01:00
New upstream release.
- - - - -
dcae47c4 by Bas Couwenberg at 2022-03-24T16:30:56+01:00
Set distribution to unstable.
- - - - -
acc7b11e by Bas Couwenberg at 2022-03-30T06:40:46+02:00
Merge tag 'debian/1.12.1-1' into bullseye-backports
releasing package mapcache version 1.12.1-1
- - - - -
7a64ced2 by Bas Couwenberg at 2022-03-30T06:41:01+02:00
Rebuild for bullseye-backports.
- - - - -
4 changed files:
- .github/workflows/build-windows.yml
- CMakeLists.txt
- debian/changelog
- lib/source_gdal.c
Changes:
=====================================
.github/workflows/build-windows.yml
=====================================
@@ -98,7 +98,7 @@ jobs:
$env:PATH_INFO = "/wmts/1.0.0/global/default/GoogleMapsCompatible/0/0/0.jpg"
$env:QUERY_STRING = ""
Start-Process -FilePath ".\mapcache.fcgi.exe" -RedirectStandardOutput "${{github.workspace}}\fcgi.jpg" -NoNewWindow -Wait
- perl.exe -0777 -pi -e 'binmode ARGV;binmode ARGVOUT;s/[A-Z][-:; ,\/=A-Za-z0-9]*\r\n//g;s/\r\n//' "${{github.workspace}}\fcgi.jpg"
+ perl.exe -0777 -pi -e 'binmode ARGV;binmode ARGVOUT;s/[A-Z][a-z][-:; ,\/=A-Za-z0-9\r\n]*//' "${{github.workspace}}\fcgi.jpg"
$match = (.\gdal\apps\gdalinfo.exe -checksum "${{github.workspace}}\fcgi.jpg" | Select-String -CaseSensitive -Pattern "Checksum=21336" -Quiet)
if ( $match ) {
"Success"
=====================================
CMakeLists.txt
=====================================
@@ -13,7 +13,7 @@ endif ()
set (MAPCACHE_VERSION_MAJOR 1)
set (MAPCACHE_VERSION_MINOR 12)
-set (MAPCACHE_VERSION_REVISION 0)
+set (MAPCACHE_VERSION_REVISION 1)
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+mapcache (1.12.1-1~bpo11+1) bullseye-backports; urgency=medium
+
+ * Rebuild for bullseye-backports.
+
+ -- Bas Couwenberg <sebastic at debian.org> Wed, 30 Mar 2022 06:40:55 +0200
+
+mapcache (1.12.1-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org> Thu, 24 Mar 2022 16:30:40 +0100
+
mapcache (1.12.0-1~bpo11+1) bullseye-backports; urgency=medium
* Rebuild for bullseye-backports.
=====================================
lib/source_gdal.c
=====================================
@@ -465,6 +465,11 @@ CreateWarpedVRT( GDALDatasetH hSrcDS,
return hDstDS;
}
+#define PREMULTIPLY(out,color,alpha)\
+{\
+ int temp = ((alpha) * (color)) + 0x80;\
+ out =((temp + (temp >> 8)) >> 8);\
+}
/**
* \private \memberof mapcache_source_gdal
@@ -478,6 +483,9 @@ void _mapcache_source_gdal_render_metatile(mapcache_context *ctx, mapcache_sourc
GDALDatasetH hTmpDS = NULL;
mapcache_buffer *data;
unsigned char *rasterdata;
+ unsigned char* rowptr;
+ unsigned char** row_pointers;
+ int i, j;
CPLErr eErr;
mapcache_pooled_connection *pc = NULL;
int bands_bgra[] = { 3, 2, 1, 4 }; /* mapcache buffer order is BGRA */
@@ -587,9 +595,41 @@ void _mapcache_source_gdal_render_metatile(mapcache_context *ctx, mapcache_sourc
map->raw_image->w = map->width;
map->raw_image->h = map->height;
map->raw_image->stride = map->width * 4;
- map->raw_image->data = rasterdata;
map->raw_image->has_alpha = MC_ALPHA_UNKNOWN;
+ // Handling of premulitiplication for GDAL sources.
+ // Since the data is already in BGRA order, there is no need to swap the bytes around.
+
+ row_pointers = malloc(map->raw_image->h * sizeof(unsigned char*));
+ apr_pool_cleanup_register(ctx->pool, row_pointers, (void*)free, apr_pool_cleanup_null);
+
+ rowptr = rasterdata;
+ for(i = 0; i < map->raw_image->h; i++) {
+ row_pointers[i] = rowptr;
+ rowptr += map->raw_image->stride;
+ }
+
+ for(i = 0; i < map->raw_image->h; i++) {
+ unsigned char pixel[4];
+ unsigned char alpha;
+ unsigned char* pixptr = row_pointers[i];
+ for(j = 0; j < map->raw_image->w; j++) {
+ memcpy(pixel, pixptr, sizeof(unsigned int));
+ alpha = pixel[3];
+ if(alpha == 0) {
+ pixptr[0] = 0;
+ pixptr[1] = 0;
+ pixptr[2] = 0;
+ } else if (alpha < 255) {
+ PREMULTIPLY(pixptr[0], pixel[0], alpha);
+ PREMULTIPLY(pixptr[1], pixel[1], alpha);
+ PREMULTIPLY(pixptr[2], pixel[2], alpha);
+ }
+ pixptr += 4;
+ }
+ }
+
+ map->raw_image->data = rasterdata;
GDALClose( hDstDS ); /* close first this one, as it references hTmpDS or hSrcDS */
if( hTmpDS )
GDALClose(hTmpDS); /* references hSrcDS, so close before */
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapcache/-/compare/c833027725828d54dbd7120101053688ecae377c...7a64ced29aa3cbeca6ece27b7ae21cf67e0d9b2a
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapcache/-/compare/c833027725828d54dbd7120101053688ecae377c...7a64ced29aa3cbeca6ece27b7ae21cf67e0d9b2a
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220330/6d4692eb/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list