Comparing version 0.4.1 to 0.4.2
@@ -25,3 +25,3 @@ export interface RawImageData<T> { | ||
}, | ||
): UintArrRet; | ||
): UintArrRet & {comments?: string[]}; | ||
export declare function decode( | ||
@@ -37,2 +37,2 @@ jpegData: BufferLike, | ||
}, | ||
): BufferRet; | ||
): BufferRet & {comments?: string[]}; |
@@ -785,2 +785,7 @@ /* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / | ||
case 0xFFDC: // Number of Lines marker | ||
readUint16() // skip data length | ||
readUint16() // Ignore this data since it represents the image height | ||
break; | ||
case 0xFFDA: // SOS (Start of Scan) | ||
@@ -1104,3 +1109,3 @@ var scanLength = readUint16(); | ||
new Uint8Array(bytesNeeded) : | ||
new Buffer(bytesNeeded) | ||
Buffer.alloc(bytesNeeded) | ||
}; | ||
@@ -1107,0 +1112,0 @@ if(decoder.comments.length > 0) { |
@@ -39,3 +39,3 @@ /* | ||
var btoa = btoa || function(buf) { | ||
return new Buffer(buf).toString('base64'); | ||
return Buffer.from(buf).toString('base64'); | ||
}; | ||
@@ -718,3 +718,3 @@ | ||
if (typeof module === 'undefined') return new Uint8Array(byteout); | ||
return new Buffer(byteout); | ||
return Buffer.from(byteout); | ||
@@ -721,0 +721,0 @@ var jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join('')); |
{ | ||
"name": "jpeg-js", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A pure javascript JPEG encoder and decoder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222416
1778