image-in-browser
Version:
Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)
48 lines • 1.16 kB
JavaScript
import { Rational } from '../../common/rational.js';
import { LibError } from '../../error/lib-error.js';
import { getIfdValueTypeSize, getIfdValueTypeString, IfdValueType, } from '../ifd-value-type.js';
export class IfdValue {
get type() {
return IfdValueType.none;
}
get length() {
return 0;
}
get dataSize() {
return getIfdValueTypeSize(this.type, this.length);
}
get typeString() {
return getIfdValueTypeString(this.type);
}
toBool(_index) {
return false;
}
toInt(_index) {
return 0;
}
toDouble(_index) {
return 0;
}
toData() {
return new Uint8Array();
}
toRational(_index) {
return new Rational(0, 1);
}
write(_out) { }
setBool(_v, _index) { }
setInt(_v, _index) { }
setDouble(_v, _index) { }
setRational(_numerator, _denomitator, _index) { }
setString(_v) { }
equals(_other) {
return false;
}
clone() {
throw new LibError('Cannot be copied.');
}
toString() {
return `${this.constructor.name}`;
}
}
//# sourceMappingURL=ifd-value.js.map