资源简介
lerc, 有限的错误光栅压缩 LERC --受限错误光栅压缩什么是 LERC?LERC是一种开源图像或者光栅格式,它支持任何像素类型( 不只是RGB或者字节)的快速编码和解码。 用户在编码时设置每个像素的最大压缩误差,从而使原始输入图像的精度保持不变。这个库包含
代码片段和文件信息
/*
Copyright 2016 Esri
Licensed under the Apache License Version 2.0 (the “License“);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing software
distributed under the License is distributed on an “AS IS“ BASIS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
A local copy of the license and additional notices are located with the
source distribution at:
http://github.com/Esri/lerc/
Contributors: Thomas Maurer Wenxue Ju
*/
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.IO;
namespace Lerc2017
{
class LercDecode
{
const string lercDll = “Lerc64.dll“;
// from Lerc_c_api.h :
//
// typedef unsigned int lerc_status;
//
// // Call this function to get info about the compressed Lerc blob. Optional.
// // Info returned in infoArray is { version dataType nDim nCols nRows nBands nValidPixels blobSize } see Lerc_types.h .
// // Info returned in dataRangeArray is { zMin zMax maxZErrorUsed } see Lerc_types.h .
// // If more than 1 band the data range [zMin zMax] is over all bands.
//
// lerc_status lerc_getBlobInfo(const unsigned char* pLercBlob unsigned int blobSize
// unsigned int* infoArray double* dataRangeArray int infoArraySize int dataRangeArraySize);
[DllImport(lercDll)]
public static extern UInt32 lerc_getBlobInfo(byte[] pLercBlob UInt32 blobSize UInt32[] infoArray double[] dataRangeArray int infoArraySize int dataRangeArraySize);
public enum DataType { dt_char dt_uchar dt_short dt_ushort dt_int dt_uint dt_float dt_double }
// Lerc decode functions for all Lerc compressed data types
// from Lerc_c_api.h :
//
// // Decode the compressed Lerc blob into a raw data array.
// // The data array must have been allocated to size (nDim * nCols * nRows * nBands * sizeof(dataType)).
// // The valid bytes array if not 0 must have been allocated to size (nCols * nRows).
//
// lerc_status lerc_decode(
// const unsigned char* pLercBlob // Lerc blob to decode
// unsigned int blobSize // blob size in bytes
// unsigned char* pValidBytes // gets filled if not null ptr even if all valid
// int nDim // number of values per pixel (new)
// int nCols int nRows int nBands // number of columns rows bands
// unsigned int dataType // data type of outgoing array
// void* pData); // outgoing data array
[DllImport(lercDll)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-10-10 00:06 lerc-master\
文件 173 2019-10-10 00:06 lerc-master\.gitignore
文件 3057 2019-10-10 00:06 lerc-master\CHANGELOG.md
文件 9198 2019-10-10 00:06 lerc-master\LICENSE
文件 679 2019-10-10 00:06 lerc-master\NOTICE
目录 0 2019-10-10 00:06 lerc-master\OtherLanguages\
目录 0 2019-10-10 00:06 lerc-master\OtherLanguages\CSharp\
文件 12460 2019-10-10 00:06 lerc-master\OtherLanguages\CSharp\LercDecode.cs
目录 0 2019-10-10 00:06 lerc-master\OtherLanguages\Python\
文件 14939 2019-10-10 00:06 lerc-master\OtherLanguages\Python\Lerc.py
目录 0 2019-10-10 00:06 lerc-master\OtherLanguages\Python\PurePython_Lerc1Only\
文件 9297 2019-10-10 00:06 lerc-master\OtherLanguages\Python\PurePython_Lerc1Only\Lerc1Decode.py
目录 0 2019-10-10 00:06 lerc-master\OtherLanguages\js\
文件 63 2019-10-10 00:06 lerc-master\OtherLanguages\js\.gitignore
文件 1385 2019-10-10 00:06 lerc-master\OtherLanguages\js\CHANGELOG.md
文件 79946 2019-10-10 00:06 lerc-master\OtherLanguages\js\LercDecode.js
文件 1618 2019-10-10 00:06 lerc-master\OtherLanguages\js\README.hbs
文件 3192 2019-10-10 00:06 lerc-master\OtherLanguages\js\README.md
文件 7663 2019-10-10 00:06 lerc-master\OtherLanguages\js\index.htm
文件 1044 2019-10-10 00:06 lerc-master\OtherLanguages\js\package.json
文件 782 2019-10-10 00:06 lerc-master\OtherLanguages\js\release.sh
文件 6943 2019-10-10 00:06 lerc-master\README.md
目录 0 2019-10-10 00:06 lerc-master\bin\
目录 0 2019-10-10 00:06 lerc-master\bin\Linux\
文件 540752 2019-10-10 00:06 lerc-master\bin\Linux\Lerc64.so
目录 0 2019-10-10 00:06 lerc-master\bin\Windows\
文件 384000 2019-10-10 00:06 lerc-master\bin\Windows\Lerc64.dll
文件 3062 2019-10-10 00:06 lerc-master\bin\Windows\Lerc64.lib
目录 0 2019-10-10 00:06 lerc-master\build\
目录 0 2019-10-10 00:06 lerc-master\build\linux\
目录 0 2019-10-10 00:06 lerc-master\build\linux\CodeBlocks\
............此处省略76个文件信息
相关资源
- 国产基础软硬件:开源、迁移、上云
- 校园失物招领系统原创开源源码
- 小米开源便签
- 江湖外卖4.0/4.1内核开源文件支持破解
- 聚合客服V25.6.0全开源公众号应用.zi
- EEG信号小波特征提取开源
- 全民经纪人豪华版3.46hc_deluxejjr微擎版
- 云笔记APP开源项目
- 米花同城社区6.6.8全开源版
- audacity开源代码
- 基于Arduino开源平台的WIFI视频监控小车
- 飞控初学者调试_EXUAV-开源飞控之王
- 树莓派开源原理图汇总
- 钻石投票5.50.8开源.zip
- PSOC4血压血氧仪开源项目
- ffmpeg的avi转flv
- 志汇同城微圈小程序11.1.5开源.zip
- 米花同城6.6.9全开源解密包含小程序代
- golang值得学习的优秀开源项目4合1
- Oviyam-2.7.4开源Web DICOM浏览器
- 使用开源的supersocket实现的路灯模拟通
- 万能客服 21.0.0+PC端插件 3.8.0 开源版,
- 开源有限元code-aster文档
- 基于QT制作的音乐播放器
- FunctionalReactiveProgrammingOniOS Functional
- BLDC直流无刷电机控制彻底开源硬件
- 鸣鹤房产中介版v1.2.6开源公众号应用
- 国外UWB室内定位开源程序
- kakadu2.2.3和openjpeg1.3两开源图像压缩软
- 8051开源IP核
评论
共有 条评论