資源簡介
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個文件信息
評論
共有 條評論