{"_id":"changedpi","_rev":"6-e4368a66fb8f4a36a3a52b70863c3eea","time":{"1.0.0":"2018-06-05T19:44:20.321Z","created":"2018-06-07T09:00:32.054Z","1.0.1":"2018-06-07T09:00:32.175Z","modified":"2022-04-12T05:55:06.603Z","1.0.2":"2018-07-12T13:03:28.069Z","1.0.3":"2018-07-12T13:14:19.442Z","1.0.4":"2018-10-22T13:19:22.915Z"},"name":"changedpi","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.1":{"name":"changedpi","version":"1.0.1","description":"Quickly change the dpi for an image without re enconding","main":"dist/index.js","scripts":{"test":"mocha --compilers js:babel-core/register","build":"babel src -d dist","lint":"eslint src/index.js"},"repository":{"type":"git","url":"git@github.shuttercorp.net:editor/changeDPI.git"},"bugs":{"url":"https://github.shuttercorp.new/editor/changeDPI/issues"},"keywords":["dpi","ediot","imagemagick","image","header","jpeg","png"],"devDependencies":{"babel-cli":"^6.18.0","babel-core":"^6.18.2","babel-preset-es2015":"^6.18.0","babelify":"^7.3.0","browserify":"^13.1.1","chai":"^3.5.0","eslint":"^3.9.1","eslint-config-standard":"^6.2.1","eslint-plugin-promise":"^3.3.0","eslint-plugin-standard":"^2.0.1","mocha":"^3.1.2","sinon":"^1.17.6","sinon-chai":"^2.8.0","watchify":"^3.7.0","atob":"^2.0.3","btoa":"^1.1.2"},"author":{"name":"Andrea Bogazzi","email":"abogazzi@shutterstock.com"},"license":"MIT","gitHead":"b325fd2f2877e5fa81e7505fb2a53a419defd8dc","_id":"changedpi@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"sstk-admin","email":"opensource@shutterstock.com"},"dist":{"integrity":"sha512-bUjc0IDKGS9ko56zPngEHBxyuU2AHbGe2zGqS3N9JOKJyEGzNW8NK21LhZ8HYEoFQoVw+4ixO2Pn8dN6APQLwQ==","shasum":"df2cba08b899fa28204303fa65c5c4424fce8cda","tarball":"https://registry.npmjs.org/changedpi/-/changedpi-1.0.1.tgz","fileCount":16,"unpackedSize":307595,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGPQwCRA9TVsSAnZWagAAXxAQAJHKOEq6sFYR0UoMr/RD\nPwl+Yw+kt+dz6b7lQ6KwkD+IdPu5VCsOhqoMyErN9ZlR02nMFp2MTYr8BRqw\nTz+szL75cxiwhBpVwt1Y/2/wMy3N/kJiQwb0Yqo3itUHRoy0J2ePA7ZOwnag\nUwIGxsyOAmhN85OwfQOxSg9e9Rkf+PhKwQE1kexuJ64AnzG+Ry1zBGDynrGQ\nHpxvuzPQ8hqxPBCI+r1ulPGMz1gWTY8/QqmakFAu9+2/3vb4cWT9T1+t548J\npWHQt4R96HWGm4V1H6wWFkBnKSf33rIDnQ7Dp/AJEWFLubZtakF3bFhgpp9S\n7P084l9JpnGIZ4xvqqJyb8qiaYu/Nj/q69MOcZV46OSiuMN0B+np94i5yOtl\n1b+ERbyRnwq30Lz0ldDjfpk20i5K8wypTzSR9a7Xy1NoNv+YfcRsPz0e34Fv\nYh2rO3a6WlNZiyjLXsCL0P5UTelnix1D3l57O/xplICZjDUDmrzDP0OGjVvj\nwLs2jvNvTQn3stivoDsrW+insM/FaTi2dM+6CirKiaNY9KQC4nlEhr84nJTl\n+gemSweAEkNnxnMBb0nzUGzT1Tlt3U0E6J3QB0LsYv+bJMBKxOr44ulZ1IQz\nTIKf/FIW1xvm8c/rHLZ1DcZiajhHxKyNjiKeHcM+4wF0A4AFjCGfr/WLkgZk\nVl2D\r\n=+MVt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbxHTLmD89mGGouf0NIuIlYjvrEWiV18AWKJS3KpQwxQIgCMHF4xkhakfDlqCfgBd5Lcq3kIkvigaKZuTxUMQ88us="}]},"maintainers":[{"name":"sstk-admin","email":"opensource@shutterstock.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/changedpi_1.0.1_1528362032055_0.7937023734352677"},"_hasShrinkwrap":false},"1.0.2":{"name":"changedpi","version":"1.0.2","description":"Quickly change the dpi for an image without re enconding","main":"dist/index.js","scripts":{"test":"mocha --compilers js:babel-core/register","build":"babel src -d dist","lint":"eslint src/index.js"},"repository":{"type":"git","url":"git@github.shuttercorp.net:editor/changeDPI.git"},"bugs":{"url":"https://github.shuttercorp.new/editor/changeDPI/issues"},"keywords":["dpi","ediot","imagemagick","image","header","jpeg","png"],"devDependencies":{"babel-cli":"^6.18.0","babel-core":"^6.18.2","babel-preset-es2015":"^6.18.0","babelify":"^7.3.0","browserify":"^13.1.1","chai":"^3.5.0","eslint":"^3.9.1","eslint-config-standard":"^6.2.1","eslint-plugin-promise":"^3.3.0","eslint-plugin-standard":"^2.0.1","mocha":"^3.1.2","sinon":"^1.17.6","sinon-chai":"^2.8.0","watchify":"^3.7.0","atob":"^2.0.3","btoa":"^1.1.2"},"author":{"name":"Andrea Bogazzi","email":"abogazzi@shutterstock.com"},"license":"MIT","gitHead":"fa37e7dce392d952f542cac4be0f23242d615d1a","_id":"changedpi@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"sstk-admin","email":"opensource@shutterstock.com"},"dist":{"integrity":"sha512-7Gjbzt3nSLTYOeYLFTRXBHVmr3gHhhVd4SViLy4yZX2IrVqCcKQH50f1E7olYXIsx8mcE34qhPUk2OwcSOqCXA==","shasum":"b18399e4d058f8477538a399fcbb9bc53e0e5a39","tarball":"https://registry.npmjs.org/changedpi/-/changedpi-1.0.2.tgz","fileCount":16,"unpackedSize":307564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbR1GgCRA9TVsSAnZWagAA5VkP/RTHiwsW9UQ0YfxLJ3Tl\nn5qtXoth2m4F9w15xz+OLe6Q/8M3aGUS5rO3yk3BOrQslNX7OouHUQLALDRM\nL1vDDrmLAEwmDVl+B3H/VlGH+UyFTj/G9kJfeA0HcxvrWUvP8jWA78UAApxV\nAI8UTodpa4DDwOWazL0pO2ddN9jYH/4oE7YrN9F7G60CA8qYhVzdka3KxsLB\nY5TAhNjznioB6lP0znouBDJijsLRLhvbKhht7dq6xynqUdliiKTc1F9KGdBr\nHrUFGKd7Q/OgNKlK07Gn8OymxlAsnQQI9p8OTBKlBzPuKM7PVY7Uvp0glKRh\njMY2CKm8lJFCCq+KmD9xuKJtisLKQCjIBOTOFsHmnOt//EpsPgfGfG9ZUb92\nZ1TfRUF8WIiHkVE7OgTvJCDrlJc3aDvJW1UkOJ2bF/D08UF7WLd/RRJM/ghp\nzdQH6OOs677KpV/FgTxufhAo7yjh//yEjLSCwU6Er0/3dVmcbfXPvlC6/Wbn\n56FQw+6sFJFU/6/8K9KNkjTV2fste3K1HoAdvI0FG+9b22pUj65kuwd/nErx\nLKjeIMwChA5B5N8G4kwdqjYmnC0I0YLYOwP9I2SUyeIX605poqG7ZEVkt6Ia\nGVOVbXoJxympUGBbev53TLUGCdLA52oa3atbnhfwGSdVYxF5tKe6Ef3wdplt\n2SXE\r\n=acyC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBIGvK2zN0x82hezL5imvdb00jI2No9DLd0n5ngosEv5AiEA6Ie46bqzqWKSxxsX8bQ9cDBzDBDHJDjc5/WMDIPiY04="}]},"maintainers":[{"name":"sstk-admin","email":"opensource@shutterstock.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/changedpi_1.0.2_1531400607911_0.7153832714237227"},"_hasShrinkwrap":false},"1.0.3":{"name":"changedpi","version":"1.0.3","description":"Quickly change the dpi for an image without re enconding","main":"dist/index.js","scripts":{"test":"mocha --compilers js:babel-core/register","build":"babel src -d dist","lint":"eslint src/index.js"},"repository":{"type":"git","url":"git+https://github.com/shutterstock/changeDPI.git"},"bugs":{"url":"https://github.com/shutterstock/changeDPI/issues"},"keywords":["dpi","ediot","imagemagick","image","header","jpeg","png"],"devDependencies":{"babel-cli":"^6.18.0","babel-core":"^6.18.2","babel-preset-es2015":"^6.18.0","babelify":"^7.3.0","browserify":"^13.1.1","chai":"^3.5.0","eslint":"^3.9.1","eslint-config-standard":"^6.2.1","eslint-plugin-promise":"^3.3.0","eslint-plugin-standard":"^2.0.1","mocha":"^3.1.2","sinon":"^1.17.6","sinon-chai":"^2.8.0","watchify":"^3.7.0","atob":"^2.0.3","btoa":"^1.1.2"},"author":{"name":"Andrea Bogazzi","email":"abogazzi@shutterstock.com"},"license":"MIT","gitHead":"6b999a2b9588a532214a2bf4962486e9133d8021","homepage":"https://github.com/shutterstock/changeDPI#readme","_id":"changedpi@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"sstk-admin","email":"opensource@shutterstock.com"},"dist":{"integrity":"sha512-kz4T5QFP0ZbZ/5Z7yg0fy6RFdNAz5IrWxQZYL12j32Dz6cTxtSPEfPsZOu6LmaxjgeucQEWUd7SNL4Z8wMoFIg==","shasum":"d2c6bd87860b70a00ecf4f52c14d90a9d5bfa997","tarball":"https://registry.npmjs.org/changedpi/-/changedpi-1.0.3.tgz","fileCount":11,"unpackedSize":21166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbR1QrCRA9TVsSAnZWagAALS0P/RGpzjGWXrNm185pSJ3S\nFguFoyQpz+FY2ZMvHq0L23IgG15tNXD6b226oSknOK+BK506u2iGWo5sHWUb\nAEPu0URfde6FXyCFAcsM8w7VLBRK//uGsGsnM5JB31eIMzptlrTwQLcyEjMI\n2D2Qd3cOCAhWgQ3uiunwENkGyvhl0xuJvozLKTHbIVxGf8niBkrekVj2y8pf\n7r0KsEAgraIIK3/EIxtkQiy/42nAl5yutxb46/GJw1h7fXWQujlGLlTWkfLy\nXDGWnr0NmEZc+NYwCNjKC9bRbCTn/yCDbSJ+gH8N4RYDGlhcx8KmRa+sqErj\nosj77tVPHy7tQzQwao4dN3W+U2dUuTixwN4fAK0yRnT/CMrsiyli3RPsgbru\nPJCxk8mBUoxSwG98SCUqfMwF/cD7kIb7J+LAG7571Njs7fh03DoD6y+4wCBG\n1qY1pHk7rq7kKn+/KDcSiAzVTt75TH7mAN3AZwtzLnDzigjnSEhGDAQ+t9Zv\nVL50VF+hH4u7LsCNRWMTAiuMi6Ck9xdmKsT6XrLlzg4nfGqGRQapjsHi/fCT\n/kfZmTUmuzeYbZdS+Bvd0ZPxQAbtj5Q/E0lHbMT6kLY5sxegAvB+8A4aSZet\n9F1+iMdaHwM1Jv6gb92i0fFlCB1uiltyXuCp1O5ecz09HsFhE0l/fqUbY98+\n2L01\r\n=krs2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCd7+kThkyLkM6ZjeUVjU/z8KI6x7xO+0hEGCwXX+pFGwIhAJEGvLGFwo+ajs2bPn/BF0Zbs90fOezUK+S+qxmvilNl"}]},"maintainers":[{"name":"sstk-admin","email":"opensource@shutterstock.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/changedpi_1.0.3_1531401259392_0.8631786055561266"},"_hasShrinkwrap":false},"1.0.4":{"name":"changedpi","version":"1.0.4","description":"Quickly change the dpi for an image without re enconding","main":"dist/index.js","scripts":{"test":"mocha --compilers js:babel-core/register","build":"babel src -d dist","lint":"eslint src/index.js"},"repository":{"type":"git","url":"git+https://github.com/shutterstock/changeDPI.git"},"bugs":{"url":"https://github.com/shutterstock/changeDPI/issues"},"keywords":["dpi","ediot","imagemagick","image","header","jpeg","png"],"devDependencies":{"babel-cli":"^6.18.0","babel-core":"^6.18.2","babel-preset-es2015":"^6.18.0","babelify":"^7.3.0","browserify":"^13.1.1","chai":"^3.5.0","eslint":"^3.9.1","eslint-config-standard":"^6.2.1","eslint-plugin-promise":"^3.3.0","eslint-plugin-standard":"^2.0.1","mocha":"^3.1.2","sinon":"^1.17.6","sinon-chai":"^2.8.0","watchify":"^3.7.0","atob":"^2.0.3","btoa":"^1.1.2"},"author":{"name":"Andrea Bogazzi","email":"abogazzi@shutterstock.com"},"license":"MIT","gitHead":"c59608985b6eb3ca47fc94556e1c795d140c1005","homepage":"https://github.com/shutterstock/changeDPI#readme","_id":"changedpi@1.0.4","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sstk-admin","email":"opensource@shutterstock.com"},"dist":{"integrity":"sha512-9r6MNQrbg+cFURvEy10wo9Q35PD5GVj2GvXCbUYv8mU0Uf/NbkR7KlzMrjT4Ycd8a2nxApFJXQX2lTOPRFyG2g==","shasum":"91b915c7e3fbbcd75559249f553902b96f3e4c7e","tarball":"https://registry.npmjs.org/changedpi/-/changedpi-1.0.4.tgz","fileCount":11,"unpackedSize":21778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbzc5bCRA9TVsSAnZWagAACVoQAJKS8fqaGduduN4doV54\nMnRLVLAZnICl/IjhGPZmaG49Cqc1u4/SF68aVFwsi4HExYDuVZXg45dD+hZm\nSc4jZqXkvy4hFC1XGtPSJR9+84IiIxFeSY6le0ThWJT9HRj72HZi7G0nZb/5\n9/JlFNXMdV5C348fNGT005joBD76YG21WWi2oOgRlYb5xQeGfoqWA5nC6T7a\ncoIdU51VXxOf6REBx4/coih0eDxWCNQlOLkELael/iwr7r6Y4tprgjSFSHHn\nk27Nvu2n6pzCfYFq9pOfFgc5pbqePNPHY2cgs1qb+xdluhM9Ie1kzrmSL9t+\noc7ullOxYvWJbKFCTVkjl9UM+6WYzDSPLngB+quGxag5fJY30nX9nHYbrraa\n4Pu64V5eRdARK/WNHzBvUR1v9kgdkzSjdWLdHecMqKNOtAoDs5ozfcJnQ0Z5\nMaifFFiX21REd+Y+TT2x4R/ING+z65F4k9zN/tT+Ge883iUI6dKtMASSF6my\ntBe+O1u/0BuEQqkYdjErTHU7RpkuCUZVExcKy+6Fb/x+8JmCN/V7mMzu5rKy\nPD/6iVyNUfVscU/kKTWTR4E9tNIToPVuvp32UUYSdtbPWX7/RH/hTsUaUAlg\n+RjJOsuslF/dEiVqWmibSyZd73/RMf1PbSD8pSB70deFzJMxO1kRAFfTAPUY\n4FFV\r\n=s2zO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHvqRMUH/zlsw3UxgpAPFpt5P/AQefJ2FVMXOE7mRe+gIhAKuHdoQf5tXbgwE4KyaswSjstPRLMbrtqO1QyGx43zTz"}]},"maintainers":[{"name":"sstk-admin","email":"opensource@shutterstock.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/changedpi_1.0.4_1540214362776_0.2544817771425698"},"_hasShrinkwrap":false}},"maintainers":[{"name":"sstk-admin","email":"opensource@shutterstock.com"}],"description":"Quickly change the dpi for an image without re enconding","keywords":["dpi","ediot","imagemagick","image","header","jpeg","png"],"repository":{"type":"git","url":"git+https://github.com/shutterstock/changeDPI.git"},"author":{"name":"Andrea Bogazzi","email":"abogazzi@shutterstock.com"},"bugs":{"url":"https://github.com/shutterstock/changeDPI/issues"},"license":"MIT","readme":"# changeDPI\n\nchangeDPI provides 2 utility functions that can change the dpi of canvas-generated image, of either dataUrl or Blob formats. The functions work on separating the header from the image data, converting and manipulating just the header, then sticking the header back on the file. In this way, very large images can be converted fast without having to convert the entire contents of an image file. This process is non-destructive&mdash;image data does not get modified in the process.\n\n## Install\n\nThis project depends on [node](https://nodejs.org) and [npm](https://npmjs.com).\n\n```js\nnpm install --save changedpi\n```\n\n## Usage\n\nFrom a canvas element dataUrl:\n```js\n// create the dataUrl at standard 72dpi\nvar dataUrl = canvas.toDataURL('image/jpeg', 0.92);\nvar daurl150dpi = changeDpiDataUrl(dataUrl, 150);\n```\n\nFrom a canvas element blob:\n```js\n// create the blob at standard 72dpi\ncanvas.toBlob(function(blob) {\n  changeDpiBlob(blob, 300).then(function(blob){\n    // use your changed blob\n  })\n},'image/jpeg', 0.92);\n```\n\n```js\n  TODO add example with file reader.\n```\n\n### ES6\n\nThis module uses ES6. To see a compiled ES5 version, run `npm run build` and look in `dist/`.\n\n## Testing\n\n```js\nnpm install .\nnpm run test\n```\n\n## Contribute\n\nPlease do contribute! Open an issue or submit a pull request.\n\nThe project falls under [@Shutterstock](https://github.com/shutterstock/welcome)'s [Code of Conduct](https://github.com/shutterstock/welcome/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nMIT.\n","readmeFilename":"README.md","homepage":"https://github.com/shutterstock/changeDPI#readme"}