版博士V2.0程序
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052
  1. # Changelog
  2. All notable changes to this project will be documented in this file.
  3. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
  4. project adheres to [Semantic Versioning](http://semver.org/).
  5. (Unreleased)
  6. ==================
  7. ### Changed
  8. ### Added
  9. ### Fixed
  10. 2.11.2
  11. ==================
  12. ### Fixed
  13. * Building on Windows in CI (and maybe other Windows configurations?) (#2216)
  14. 2.11.1
  15. ==================
  16. ### Fixed
  17. * Add missing property `canvas` to the `CanvasRenderingContext2D` type
  18. * Fixed glyph positions getting rounded, resulting text having a slight `letter-spacing` effect
  19. * Fixed `ctx.font` not being restored correctly after `ctx.restore()` (#1946)
  20. 2.11.0
  21. ==================
  22. ### Fixed
  23. * Replace triple-slash directive in types with own types to avoid polluting TS modules with globals ([#1656](https://github.com/Automattic/node-canvas/issues/1656))
  24. 2.10.2
  25. ==================
  26. ### Fixed
  27. * Fix `Assertion failed: (object->InternalFieldCount() > 0), function Unwrap, file nan_object_wrap.h, line 32.` ([#2025](https://github.com/Automattic/node-canvas/issues/2025))
  28. * `textBaseline` and `textAlign` were not saved/restored by `save()`/`restore()`. ([#1936](https://github.com/Automattic/node-canvas/issues/2029))
  29. * Update nan to v2.17.0 to ensure Node.js v18+ support.
  30. ### Changed
  31. * Improve performance and memory usage of `save()`/`restore()`.
  32. * `save()`/`restore()` no longer have a maximum depth (previously 64 states).
  33. 2.10.1
  34. ==================
  35. ### Fixed
  36. * Fix `actualBoundingBoxLeft` and `actualBoundingBoxRight` when `textAlign='center'` or `'right'` ([#1909](https://github.com/Automattic/node-canvas/issues/1909))
  37. * Fix `rgba(r,g,b,0)` with alpha to 0 should parse as transparent, not opaque. ([#2110](https://github.com/Automattic/node-canvas/pull/2110))
  38. 2.10.0
  39. ==================
  40. ### Added
  41. * Export `pangoVersion`
  42. * [`ctx.roundRect()`](https://developer.chrome.com/blog/canvas2d/#round-rect)
  43. ### Fixed
  44. * `rgba(r,g,b)` with no alpha should parse as opaque, not transparent. ([#2029](https://github.com/Automattic/node-canvas/issues/2029))
  45. * Typo in `PngConfig.filters` types. ([#2072](https://github.com/Automattic/node-canvas/issues/2072))
  46. * `createPattern()` always used "repeat" mode; now supports "repeat-x" and "repeat-y". ([#2066](https://github.com/Automattic/node-canvas/issues/2066))
  47. * Crashes and hangs when using non-finite values in `context.arc()`. ([#2055](https://github.com/Automattic/node-canvas/issues/2055))
  48. * Incorrect `context.arc()` geometry logic for full ellipses. ([#1808](https://github.com/Automattic/node-canvas/issues/1808), ([#1736](https://github.com/Automattic/node-canvas/issues/1736)))
  49. * Added missing `deregisterAllFonts` to the Typescript declaration file ([#2096](https://github.com/Automattic/node-canvas/pull/2096))
  50. * Add `User-Agent` header when requesting remote images ([#2099](https://github.com/Automattic/node-canvas/issues/2099))
  51. 2.9.3
  52. ==================
  53. ### Fixed
  54. * Wrong fonts used when calling `registerFont` multiple times with the same family name ([#2041](https://github.com/Automattic/node-canvas/issues/2041))
  55. 2.9.2
  56. ==================
  57. ### Fixed
  58. * All exports now work when Canvas is used in ES Modules (ESM). ([#2047](https://github.com/Automattic/node-canvas/pull/2047))
  59. * `npm rebuild` will now re-fetch prebuilt binaries to avoid `NODE_MODULE_VERSION` mismatch errors. ([#1982](https://github.com/Automattic/node-canvas/pull/1982))
  60. 2.9.1
  61. ==================
  62. ### Fixed
  63. * Stringify CanvasGradient, CanvasPattern and ImageData like browsers do. (#1639, #1646)
  64. * Add missing include for `toupper`.
  65. * Throw an error instead of crashing the process if `getImageData` or `putImageData` is called on a PDF or SVG canvas (#1853)
  66. * Compatibility with Typescript 4.6
  67. * Near-perfect font matching on Linux (#1572)
  68. * Fix multi-byte font path support on Windows.
  69. * Allow rebuild of this library
  70. 2.9.0
  71. ==================
  72. ### Changed
  73. * Refactor functions to classes.
  74. * Changed `DOMPoint()` constructor to check for parameter nullability.
  75. * Changed `DOMMatrix.js` to use string literals for non-special cases.
  76. * Remove semicolons from Dommatrix.js.
  77. * Update nan to v2.15.0 to ensure Node.js v14+ support.
  78. * Clean up inf/nan macros and slightly speed up argument checking.
  79. ### Added
  80. * Added `deregisterAllFonts` method to free up memory and reduce font conflicts.
  81. ### Fixed
  82. * Support Apple M1 Homebrew install that puts canvas install library files in `/opt/homebrew/lib`
  83. 2.8.0
  84. ==================
  85. ### Changed
  86. * Upgrade dtslint
  87. * Upgrade node-pre-gyp to 1.0.0. Note that if you are using special node-pre-gyp
  88. features like `node_pre_gyp_accessKeyId`, you may need to make changes to your
  89. installation procedure. See https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#100.
  90. * Add Node.js v16 to CI.
  91. * The C++ class method `nBytes()` now returns a size_t. (Because this is a C++
  92. method only, this is not considered a breaking change.)
  93. ### Added
  94. * Add support for `inverse()` and `invertSelf()` to `DOMMatrix` (#1648)
  95. * Add support for `context.getTransform()` ([#1769](https://github.com/Automattic/node-canvas/pull/1769))
  96. * Add support for `context.setTransform(dommatrix)` ([#1769](https://github.com/Automattic/node-canvas/pull/1769))
  97. ### Fixed
  98. * Fix `actualBoundingBoxLeft` and `actualBoundingBoxRight` returned by `measureText` to be the ink rect ([#1776](https://github.com/Automattic/node-canvas/pull/1776), fixes [#1703](https://github.com/Automattic/node-canvas/issues/1703)).
  99. * Fix Pango logging "expect ugly output" on Windows (#1643)
  100. * Fix benchmark for createPNGStream (#1672)
  101. * Fix dangling reference in BackendOperationNotAvailable exception (#1740)
  102. * Fix always-false comparison warning in Canvas.cc.
  103. * Fix Node.js crash when throwing from an onload or onerror handler.
  104. 2.7.0
  105. ==================
  106. ### Changed
  107. * Switch CI to Github Actions. (Adds Windows and macOS builds.)
  108. * Switch prebuilds to GitHub actions in the Automattic/node-canvas repository.
  109. Previously these were in the [node-gfx/node-canvas-prebuilt](https://github.com/node-gfx/node-canvas-prebuilt)
  110. and triggered manually.
  111. * Speed up `fillStyle=` and `strokeStyle=`
  112. ### Added
  113. * Export `rsvgVersion`.
  114. * CanvasPattern’s `setTransform` method is no longer missing
  115. ### Fixed
  116. * Fix BMP issues. (#1497)
  117. * Update typings to support jpg and addPage on NodeCanvasRenderingContext2D (#1509)
  118. * Fix assertion failure when using Visual Studio Code debugger to inspect Image prototype (#1534)
  119. * Fix signed/unsigned comparison warning introduced in 2.6.0, and function cast warnings with GCC8+
  120. * Fix to compile without JPEG support (#1593).
  121. * Fix compile errors with cairo
  122. * Fix Image#complete if the image failed to load.
  123. * Upgrade node-pre-gyp to v0.15.0 to use latest version of needle to fix error when downloading prebuilds.
  124. * Don't throw if `fillStyle` or `strokeStyle` is set to an object, but that object is not a Gradient or Pattern. (This behavior was non-standard: invalid inputs are supposed to be ignored.)
  125. 2.6.1
  126. ==================
  127. ### Fixed
  128. * Ignore `maxWidth` in `fillText` and `strokeText` if it is undefined
  129. * Fix crash (assertion failure) in Node.js 12.x when patterns or gradients are used
  130. * Fix crash (check failure) in Node.js 12.x when using RGB16_565 format. (The
  131. underlying arraybuffer was incorrectly sized.)
  132. * Fix rendering error when applying shadow width line style (lineCap lineJoin lineDash)
  133. 2.6.0
  134. ==================
  135. ### Changed
  136. * Allow larger buffers to be returned from `toBuffer('raw')`.
  137. ### Added
  138. * Support for various BMP headers and color depths (#1435)
  139. ### Fixed
  140. * Fix crash when changing canvas width/height while `fillStyle` or `strokeStyle`
  141. was set to a `CanvasPattern` or `CanvasGradient` (#1357).
  142. * Fix crash when changing width/height of SVG canvases (#1380).
  143. * Fix crash when using `toBuffer('raw')` with large canvases (#1158).
  144. * Clarified meaning of byte ordering for `toBuffer('raw')` in readme. (#1416)
  145. * Fix package.json Typings field to point to Declaration file (#1432)
  146. * Properly check return value from `Set` and `Call`. (#1415)
  147. * Use `Get` version from `Nan` instead of `v8`. (#1415)
  148. 2.5.0
  149. ==================
  150. ### Added
  151. * Support redirects when fetching images (using [simple-get](https://github.com/feross/simple-get)) (#1398)
  152. * Support Node.js v12
  153. ### Fixed
  154. * Fix object literal & arrow function syntax usage for IE.
  155. 2.4.1
  156. ==================
  157. ### Fixed
  158. * Guard JPEG width/height against maximum supported (#1385)
  159. * Fix electron 5 and node 12 compatibility
  160. * Fix encoding options (quality) parameter in `canvas.toDataURL()`
  161. 2.4.0
  162. ==================
  163. ### Added
  164. * (Actually) added `resolution` option for `canvas.toBuffer("image/png")` and
  165. `canvas.createPNGStream()`. This was documented since 2.0.0 but not working.
  166. * Add typescript definitions.
  167. ### Fixed
  168. * PDF metadata (added in 2.3.0) wasn't being set with `canvas.createPDFStream()`
  169. * Fix custom "inspect" function deprecation warnings (#1326)
  170. 2.3.1
  171. ==================
  172. ### Fixed
  173. * Fix `canvas.toBuffer()` for JPEGs (#1350)
  174. 2.3.0
  175. ==================
  176. ### Added
  177. * Add support for multiple PDF page sizes
  178. * Add support for embedding document metadata in PDFs
  179. ### Fixed
  180. * Don't crash when font string is invalid (bug since 2.2.0) (#1328)
  181. * Fix memory leak in `canvas.toBuffer()` (#1202, #1296)
  182. * Fix memory leak in `ctx.font=` (#1202)
  183. 2.2.0
  184. ==================
  185. ### Added
  186. * BMP support
  187. ### Fixed
  188. * Reset context on resurface (#1292)
  189. * Support Jest test framework (#1311)
  190. 2.1.0
  191. ==================
  192. ### Added
  193. * Warn when building with old, unsupported versions of cairo or libjpeg.
  194. 2.0.0
  195. ==================
  196. **Upgrading from 1.x**
  197. ```js
  198. // (1) The Canvas constructor is no longer the default export from the module.
  199. /* old: */
  200. const Canvas = require('canvas')
  201. const mycanvas = new Canvas(width, height)
  202. /* new: */
  203. const { createCanvas, Canvas } = require('canvas')
  204. const mycanvas = createCanvas(width, height)
  205. mycanvas instanceof Canvas // true
  206. /* old: */
  207. const Canvas = require('canvas')
  208. const myimg = new Canvas.Image()
  209. /* new: */
  210. const { Image } = require('canvas')
  211. const myimg = new Image()
  212. // (2) The quality argument for canvas.createJPEGStream/canvas.jpegStream now
  213. // goes from 0 to 1 instead of from 0 to 100:
  214. canvas.createJPEGStream({ quality: 50 }) // old
  215. canvas.createJPEGStream({ quality: 0.5 }) // new
  216. // (3) The ZLIB compression level and PNG filter options for canvas.toBuffer are
  217. // now named instead of positional arguments:
  218. canvas.toBuffer(undefined, 3, canvas.PNG_FILTER_NONE) // old
  219. canvas.toBuffer(undefined, { compressionLevel: 3, filters: canvas.PNG_FILTER_NONE }) // new
  220. // or specify the mime type explicitly:
  221. canvas.toBuffer('image/png', { compressionLevel: 3, filters: canvas.PNG_FILTER_NONE }) // new
  222. // (4) #2 also applies for canvas.pngStream, although these arguments were not
  223. // documented:
  224. canvas.pngStream(3, canvas.PNG_FILTER_NONE) // old
  225. canvas.pngStream({ compressionLevel: 3, filters: canvas.PNG_FILTER_NONE }) // new
  226. // (5) canvas.syncPNGStream() and canvas.syncJPEGStream() have been removed:
  227. canvas.syncPNGStream() // old
  228. canvas.createSyncPNGStream() // old
  229. canvas.createPNGStream() // new
  230. canvas.syncJPEGStream() // old
  231. canvas.createSyncJPEGStream() // old
  232. canvas.createJPEGStream() // new
  233. // (6) Context2d.filter has been renamed to context2d.quality to avoid a
  234. // conflict with the new standard 'filter' property.
  235. context.filter = 'best' // old
  236. context.quality = 'best' // new
  237. ```
  238. ### Breaking
  239. * Drop support for Node.js <6.x
  240. * Remove sync stream functions (bc53059). Note that most streams are still
  241. synchronous (run in the main thread); this change just removed `syncPNGStream`
  242. and `syncJPEGStream`.
  243. * Pango is now *required* on all platforms (7716ae4).
  244. * Make the `quality` argument for JPEG output go from 0 to 1 to match HTML spec.
  245. * Make the `compressionLevel` and `filters` arguments for `canvas.toBuffer()`
  246. named instead of positional. Same for `canvas.pngStream()`, although these
  247. arguments were not documented.
  248. * See also: *Correct some of the `globalCompositeOperator` types* under
  249. **Fixed**. These changes were bug-fixes, but will break existing code relying
  250. on the incorrect types.
  251. * Rename `context2d.filter` to `context2d.quality` to avoid a conflict with the
  252. new standard 'filter' property. Note that the standard 'filter' property is
  253. not yet implemented.
  254. ### Fixed
  255. * Fix build with SVG support enabled (#1123)
  256. * Prevent segfaults caused by loading invalid fonts (#1105)
  257. * Fix memory leak in font loading
  258. * Port has_lib.sh to javascript (#872)
  259. * Correctly sample the edge of images when scaling (#1084)
  260. * Detect CentOS libjpeg path (b180ea5)
  261. * Improve measureText accuracy (2bbfec5)
  262. * Fix memory leak when image callbacks reference the image (1f4b646)
  263. * Fix putImageData(data, negative, negative) (2102e25)
  264. * Fix SVG recognition when loading from buffer (77749e6)
  265. * Re-rasterize SVG when drawing to a context and dimensions changed (79bf232)
  266. * Prevent JPEG errors from crashing process (#1124)
  267. * Improve handling of invalid arguments (#1129)
  268. * Fix repeating patterns when drawing a canvas to itself (#1136)
  269. * Prevent segfaults caused by creating a too large canvas
  270. * Fix parse-font regex to allow for whitespaces.
  271. * Allow assigning non-string values to fillStyle and strokeStyle
  272. * Fix drawing zero-width and zero-height images.
  273. * Fix DEP0005 deprecation warning
  274. * Don't assume `data:` URIs assigned to `img.src` are always base64-encoded
  275. * Fix formatting of color strings (e.g. `ctx.fillStyle`) on 32-bit platforms
  276. * Explicitly export symbols for the C++ API
  277. * Named CSS colors should match case-insensitive
  278. * Correct some of the `globalCompositeOperator` types to match the spec:
  279. * "hsl-hue" is now "hue"
  280. * "hsl-saturation" is now "saturation"
  281. * "hsl-color" is now "color"
  282. * "hsl-luminosity" is now "luminosity"
  283. * "darker" is now "darken"
  284. * "dest" is now "destination"
  285. * "add" is removed (but is the same as "lighter")
  286. * "source" is now "copy"
  287. * Provide better, Node.js core-style coded errors for failed sys calls. (For
  288. example, provide an error with code 'ENOENT' if setting `img.src` to a path
  289. that does not exist.)
  290. * Support reading CMYK, YCCK JPEGs.
  291. * Hide `Image.prototype.source`
  292. * Fix behavior of maxWidth (#1088)
  293. * Fix behavior of textAlignment with maxWidth (#1253)
  294. ### Added
  295. * Prebuilds (#992) with different libc versions to the prebuilt binary (#1140)
  296. * Support `canvas.getContext("2d", {alpha: boolean})` and
  297. `canvas.getContext("2d", {pixelFormat: "..."})`
  298. * Support indexed PNG encoding.
  299. * Support `currentTransform` (d6714ee)
  300. * Export `CanvasGradient` (6a4c0ab)
  301. * Support #RGBA , #RRGGBBAA hex colors (10a82ec)
  302. * Support maxWidth arg for fill/strokeText (175b40d)
  303. * Support image.naturalWidth/Height (a5915f8)
  304. * Render SVG img elements when librsvg is available (1baf00e)
  305. * Support ellipse method (4d4a726)
  306. * Browser-compatible API (6a29a23)
  307. * Support for jpeg on Windows (42e9a74)
  308. * Support for backends (1a6dffe)
  309. * Support for `canvas.toBuffer("image/jpeg")`
  310. * Unified configuration options for `canvas.toBuffer()`, `canvas.pngStream()`
  311. and `canvas.jpegStream()`
  312. * ~~Added `resolution` option for `canvas.toBuffer("image/png")` and
  313. `canvas.createPNGStream()`~~ this was not working
  314. * Support for `canvas.toDataURI("image/jpeg")` (sync)
  315. * Support for `img.src = <url>` to match browsers
  316. * Support reading data URL on `img.src`
  317. * Readme: add dependencies command for OpenBSD
  318. * Throw error if calling jpegStream when canvas was not built with JPEG support
  319. * Emit error if trying to load GIF, SVG or JPEG image when canvas was not built
  320. with support for that format
  321. 1.6.x (unreleased)
  322. ==================
  323. ### Fixed
  324. * Make setLineDash able to handle full zeroed dashes (b8cf1d7)
  325. * Fix reading fillStyle after setting it from gradient to color (a84b2bc)
  326. ### Added
  327. * Support for pattern repeat and no-repeat (#1066)
  328. * Support for context globalAlpha for gradients and patterns (#1064)
  329. 1.6.9 / 2017-12-20
  330. ==================
  331. ### Fixed
  332. * Fix some instances of crashes (7c9ec58, 8b792c3)
  333. * Fix node 0.x compatibility (dca33f7)
  334. 1.6.8 / 2017-12-12
  335. ==================
  336. ### Fixed
  337. * Faster, more compliant parseFont (4625efa, 37cd969)
  338. 1.6.7 / 2017-09-08
  339. ==================
  340. ### Fixed
  341. * Minimal backport of #985 (rotated text baselines) (c19edb8)
  342. 1.6.6 / 2017-05-03
  343. ==================
  344. ### Fixed
  345. * Use .node extension for requiring native module so webpack works (1b05599)
  346. * Correct text baseline calculation (#1037)
  347. 1.6.5 / 2017-03-18
  348. ==================
  349. ### Changed
  350. * Parse font using parse-css-font and units-css (d316416)
  351. 1.6.4 / 2017-02-26
  352. ==================
  353. ### Fixed
  354. * Make sure Canvas#toDataURL is always async if callback is passed (8586d72)
  355. 1.6.3 / 2017-02-14
  356. ==================
  357. ### Fixed
  358. * Fix isnan() and isinf() on clang (5941e13)
  359. 1.6.2 / 2016-10-30
  360. ==================
  361. ### Fixed
  362. * Fix deprecation warnings (c264879)
  363. * Bump nan (e4aea20)
  364. 1.6.1 / 2016-10-23
  365. ==================
  366. ### Fixed
  367. * Make has_lib.sh work on BSD OSes (1727d66)
  368. 1.6.0 / 2016-10-16
  369. ==================
  370. * Support canvas.getBuffer('raw') (#819)
  371. 1.5.0 / 2016-09-11
  372. ==================
  373. * Crude PDF stream implementation (#781)
  374. * Update CI settings (#797)
  375. * Reduce some of the install warnings (#794)
  376. * Fix lineDash browser tests never finishing (#793)
  377. * Add issue template (#791)
  378. 1.4.0 / 2016-06-03
  379. ==================
  380. * Add support for evenodd fill rule (#762)
  381. 1.3.17 / 2016-06-03
  382. ===================
  383. * Removing redundant duplicate calls (#769)
  384. * Cleanup examples (#776)
  385. * Fix CanvasRenderingContext2D class name (#777)
  386. 1.3.16 / 2016-05-29
  387. ===================
  388. * Fix leak of data when streaming JPEG (#774)
  389. 1.3.15 / 2016-05-09
  390. ===================
  391. * Fix segfault in putImageData (#750)
  392. 1.3.14 / 2016-05-05
  393. ===================
  394. * Clamp JPEG buffer size (#739)
  395. 1.3.13 / 2016-05-01
  396. ===================
  397. * Bumb NAN version (#759)
  398. 1.3.12 / 2016-03-01
  399. ===================
  400. * Expose freetype version (#718)
  401. * Require new in constructor (#717)
  402. 1.3.11 / 2016-03-01
  403. ===================
  404. * Properly clamp quality in toDataURL (#728)
  405. * Strict mode (#719)
  406. 1.3.10 / 2016-02-07
  407. ===================
  408. * Fix segfault on node 0.10.x (#712)
  409. 1.3.9 / 2016-01-27
  410. ==================
  411. * Allow to unbind onload/onerror callback handlers (#706)
  412. 1.3.8 / 2016-01-22
  413. ==================
  414. * Cleanup build scripts and fix pangocairo detection (#701)
  415. 1.3.7 / 2016-01-13
  416. ==================
  417. * Don't unbind onload/onerror callbacks after invoking them (#615)
  418. 1.3.6 / 2016-01-06
  419. ==================
  420. * Allow optional arguments in `toDataURL` to be `undefined` and improve `toDataURL`'s spec compliance (#690)
  421. 1.3.5 / 2015-12-07
  422. ==================
  423. * Add image/jpeg support to `toDataUrl` (#685)
  424. 1.3.4 / 2015-11-21
  425. ==================
  426. * Upgrade nan to 2.1.0 (#671)
  427. 1.3.3 / 2015-11-21
  428. ==================
  429. * Fix compilation on Visual Studio 2015 (#670)
  430. 1.3.2 / 2015-11-18
  431. ==================
  432. * Fix incorrect Y offset and scaling for shadows (#669)
  433. 1.3.1 / 2015-11-09
  434. ==================
  435. * Wrap std::min calls in paranthesis to prevent macro expansion on windows (#660)
  436. 1.3.0 / 2015-10-26
  437. ==================
  438. * Expose ImageData constructor and make it more spec-compliant (#569)
  439. 1.2.11 / 2015-10-20
  440. ===================
  441. * Implement blur on images (#648)
  442. 1.2.10 / 2015-10-12
  443. ===================
  444. * Fix segfault in Canvas#jpegStream (#629)
  445. 1.2.9 / 2015-09-14
  446. ==================
  447. * Upgrade to Nan 2.x with support for iojs 3.x and Node.js 4.x (#622)
  448. 1.2.8 / 2015-08-30
  449. ==================
  450. * Clean up the tests (#612)
  451. * Replace CanvasPixelArray with Uint8ClampedArray to be API-compliant (#604)
  452. * Specify travis iojs versions (#611)
  453. 1.2.7 / 2015-07-29
  454. ==================
  455. * Avoid future reserved keyword (#592)
  456. 1.2.6 / 2015-07-29
  457. ==================
  458. * Fix the build on windows (#589)
  459. 1.2.5 / 2015-07-28
  460. ==================
  461. * Another npm release, since 1.2.4 was botched (see #596)
  462. 1.2.4 / 2015-07-23
  463. ==================
  464. * Point `homepage` and `repository` links to [`github.com/Automattic/node-canvas`][repo]
  465. * Fix Travis builds and Cairo include paths (thanks, Linus Unnebäck!)
  466. 1.2.3 / 2015-05-21
  467. ==================
  468. * Update TJ Holowaychuk's username in the readme
  469. * Fix segmentation fault in `Image::loadFromBuffer` when buffer is empty
  470. * Optimize getImageData()
  471. * package: add "license" attribute
  472. * package: update "nan" to v1.8.4
  473. * package: append `.git` to "repository" URL
  474. 1.2.2 / 2015-04-18
  475. ==================
  476. * Now works on io.js
  477. * Fix 'drawImage' scaling (the dimensions of the region that gets clipped also needs to be scaled).
  478. * Fix bug in StreamPNGSync
  479. 1.2.1 / 2015-02-10
  480. ==================
  481. * Use non-cairo 1.12 API for shadow blur
  482. 1.2.0 / 2015-01-31
  483. ==================
  484. * travis: drop support for node v0.6
  485. * Merge pull request #507 from salzhrani/iojs
  486. * io.js compatibility
  487. * Merge pull request #505 from woodcoder/shadow-blur
  488. * Fix issue with line width not being correct in stroked shadows.
  489. * Add another shadow/transform test.
  490. * Refactor setSourceRGBA to allow the context to be supplied.
  491. * Simple image shadow (no blurring or handling current transforms) based on image's alpha channel.
  492. * Test showing issue #133, that images don't have shadows.
  493. * The +1 on the offset seems to match the browser's output better, but I can't work out why it would be needed (unless it's pixel alignment related).
  494. * Make the shadow radius more accurately match the browser's, making use of sigma scale as used in SKIA: https://github.com/google/skia/blob/master/src/effects/SkBlurMask.cpp#L26.
  495. * Create a new image surface to render blurred shadows to, this means that vector formats like PDF will now render blurs.
  496. * Add recommended calls to flush and dirty buffer, as per http://www.cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-data.
  497. * Add PDF button to test page to easily generate PDF version of the test image.
  498. * Fix to ensure shadowOffset is unaffected by the current transform.
  499. * New test illustrating that canvas implementation doesn't translate the shadowOffset.
  500. * Merge pull request #490 from AllYearbooks/master
  501. * Merge pull request #501 from motiz88/hsl-color
  502. * Code style + attribution. Also removed parseClipped() and commented out wrapInt (now wrap_int).
  503. * Added visual tests for hsl() and hsla() color parsing.
  504. * Fixed <number> handling in hsl/hsla color parser. parseNumber() was erroring out on numbers with long fractional parts.
  505. * hsl/hsla color parsing + rebeccapurple hsl() and hsla() color values are now supported, with corresponding unit tests. Also added rebeccapurple (from CSS Color Level 4) to the named color list.
  506. * float rather than int for drawImage arguments
  507. * with_pango to true and use fontconfig to load fonts
  508. * Merge pull request #399 from nulltask/fix/lighten
  509. * Merge pull request #465 from espadrine/master
  510. * Merge pull request #470 from tonylukasavage/patch-1
  511. * Add one-liner MacPorts install to docs
  512. * Offer SVG output.
  513. * Readme update: node-gyp.
  514. * Readme: fix subheading size
  515. * Readme: remove Gemnasium badge, use SVG for npm badge
  516. * Readme: add Travis-CI badge
  517. * change operator lighter to lighten
  518. 1.1.6 / 2014-08-01
  519. ==================
  520. * export canvas.CanvasPixelArray instead of canvas.PixelArray which is undefined
  521. * Glib version test into giflib exists test
  522. * Giflib 5.1
  523. * install: use an even older version of giflib (v4.1.6)
  524. * install: use an older version of giflib (v4.2.3)
  525. * install: install `giflib`
  526. * install: use more compatible sh syntax
  527. * travis: attempt to run the ./install script before testintg
  528. * travis: test node v0.6, v0.8, v0.10, and v0.11
  529. * Distinguish between 'add' and 'lighter'
  530. 1.1.5 / 2014-06-26
  531. ==================
  532. * Readme: remove Contributors section
  533. * Readme: update copyright
  534. * On Windows, copy required DLLs next to ".node" file (#442 @pandell)
  535. * Duplicate "msvc_settings" for "Debug" configuration
  536. * Remove unneeded #include <nan.h>
  537. * Use float constants to prevent double->float conversion warning
  538. * Ignore Visual C++ 2013 warnings (#441 @pandell)
  539. * Add algorithm include to CanvasRenderingContext2d.cc for std::min (#435 @kkoopa)
  540. * Updated NAN to 1.2.0 (#434 @kkoopa)
  541. 1.1.4 / 2014-06-08
  542. ==================
  543. * Fix compile error with Visual C++
  544. * Add support for the lineDash API
  545. * Update NAN
  546. * New V8 compatibility
  547. * Correctly limit bounds in PutImageData to prevent segment fault
  548. * Fix segfault when onload and onerror are not function
  549. * Add support for Node 0.11.9
  550. 1.1.3 / 2014-01-08
  551. ==================
  552. * Add CAIRO_FORMAT_INVALID
  553. * Readjust the amount of allocated memory
  554. * Fix argument index for filter parameter
  555. * Make has_lib.sh work properly on Debian 64bit
  556. 1.1.2 / 2013-10-31
  557. ==================
  558. * NAN dep upgrade, full node@<=0.11.8 compatibility
  559. * Use node::MakeCallback() instead of v8::Function::Call()
  560. * Improve nan location discovery
  561. * Fix enabling gif/jpeg options on Ubuntu 13.04
  562. 1.1.1 / 2013-10-09
  563. ==================
  564. * add better support for outdated versions of Cairo
  565. 1.1.0 / 2013-08-01
  566. ==================
  567. * add png compression options
  568. * add jpeg stream progressive mode option
  569. * fix resource leaks on read errors
  570. 1.0.4 / 2013-07-23
  571. ==================
  572. * 0.11.4+ compatibility using NAN
  573. * fix typo in context2d for imageSmoothingEnabled
  574. 1.0.3 / 2013-06-04
  575. ==================
  576. * add "nearest" and "bilinear" to patternQuality
  577. * fix fread() retval check (items not bytes)
  578. * removed unneeded private fields
  579. 1.0.2 / 2013-03-22
  580. ==================
  581. * add Context2d#imageSmoothingEnabled=
  582. 1.0.1 / 2013-02-25
  583. ==================
  584. * travis: test modern node versions
  585. * change the node-gyp build to use pkg-config
  586. 1.0.0 / 2013-01-16
  587. ==================
  588. * add conditional pango font support [Julian Viereck]
  589. * add `Canvas#{png,jpeg}Stream()` alias of create* legacy methods
  590. * add support for grayscale JPEGs
  591. * fix: explicitly cast the after work callback function to "uv_after_work_cb"
  592. * fix test server for express 3.x
  593. * fix: call cairo_surface_finish in ~Canvas when pdf
  594. * remove old 0.4.x binding support. Closes #197
  595. 0.13.1 / 2012-08-20
  596. ==================
  597. * fix cases where GIF_LIB_VERSION is not defined
  598. * fix auto-detection of optional libraries for OS X
  599. * fix Context2d::SetFont for pango when setting normal weight/style
  600. 0.13.0 / 2012-08-12
  601. ==================
  602. * add pango support [c-spencer]
  603. * add pango / png / jpeg gyp auto-detection [c-spencer]
  604. * add `.gifVersion` [tootallnate]
  605. * add `.jpegVersion` [tootallnate]
  606. * add moar gyp stuff [tootallnate]
  607. * remove wscript
  608. * fix `closure_destroy()` with cast for `AdjustAmountOfExternalAllocatedMemory()`
  609. 0.12.1 / 2012-06-29
  610. ==================
  611. * fix jpeg malloc Image issue. Closes #160 [c-spencer]
  612. * Improve Image mode API
  613. * Add clearData method to handle reassignment of src, and clean up mime data memory handling.
  614. * Improve how _data_len is managed and use to adjust memory, hide more of mime API behind cairo version conditional.
  615. * Add optional mime-data tracking to Image.
  616. * Refactor JPEG decoding into decodeJPEGIntoSurface
  617. 0.12.0 / 2012-05-02
  618. ==================
  619. * Added `textDrawingMode` context property [c-spencer]
  620. * Added additional TextMetrics properties [c-spencer]
  621. 0.11.3 / 2012-04-25
  622. ==================
  623. * Fixed `Image` memory leak. Closes #150
  624. * Fixed Context2d::hasShadow()
  625. 0.11.2 / 2012-04-12
  626. ==================
  627. * Fixed: pdf memory leak, free closure and surface in ~Canvas
  628. 0.11.1 / 2012-04-10
  629. ==================
  630. * Changed: renamed .nextPage() to .addPage()
  631. 0.11.0 / 2012-04-10
  632. ==================
  633. * Added quick PDF support
  634. * Added `Canvas#type` getter
  635. * Added ./examples/pdf-images.js
  636. * Added ./examples/multiple-page-pdf.js
  637. * Added ./examples/small-pdf.js
  638. 0.10.3 / 2012-02-27
  639. ==================
  640. * Fixed quadratic curve starting point for undefined path. Closes #155
  641. 0.10.2 / 2012-02-06
  642. ==================
  643. * Fixed: Context2d setters with invalid values ignored
  644. * Changed: replaced seek with `fstat()`
  645. 0.10.1 / 2012-01-31
  646. ==================
  647. * Added _/opt/local/lib_ to wscript [obarthel]
  648. * Added bounds checking to `rgba_to_string()` [obarthel]
  649. * Fixed cleanup in JPEG Image loading [obarthel]
  650. * Fixed missing CSS color table values [obarthel]
  651. 0.10.0 / 2012-01-18
  652. ==================
  653. * Added `ctx.createPattern()` [slaskis]
  654. 0.9.0 / 2012-01-13
  655. ==================
  656. * Added `createJPEGStream()` [Elijah Hamovitz]
  657. 0.8.3 / 2012-01-04
  658. ==================
  659. * Added support for libjpeg62-dev or libjpeg8-dev [wwlinx]
  660. 0.8.2 / 2011-12-14
  661. ==================
  662. * Fixed two memory leaks in context2d [Tharit]
  663. * Fixed `make test-server`
  664. 0.8.1 / 2011-10-31
  665. ==================
  666. * Added 0.5.x support [TooTallNate]
  667. * Fixed `measureText().width`. Closes #126
  668. 0.8.0 / 2011-10-28
  669. ==================
  670. * Added data uri support. Closes #49
  671. 0.7.3 / 2011-09-14
  672. ==================
  673. * Added better lineTo() / moveTo() exception messages
  674. 0.7.2 / 2011-08-30
  675. ==================
  676. * Changed: prefix some private methods with _
  677. 0.7.1 / 2011-08-25
  678. ==================
  679. * Added better image format detection
  680. * Added libpath options to waf configuration; this was necessary to correctly detect gif and jpeg support on FreeBSD
  681. 0.7.0 / 2011-07-12
  682. ==================
  683. * Added GIF support [Brian McKinney]
  684. 0.6.0 / 2011-06-04
  685. ==================
  686. * Added `Image#src=Buffer` support. Closes #91
  687. * Added `devDependencies`
  688. * Added `source-atop` test
  689. * Added _image-src.js_ example
  690. * Removed `V8::AdjustAmountOfExternalAllocatedMemory()` call from `toBuffer()`
  691. * Fixed v8 memory hint when resizing canvas [atomizer]
  692. 0.5.4 / 2011-04-20
  693. ==================
  694. * Added; special case of zero-width rectangle [atomizer]
  695. * Fixed; do not clamp arguments to integer values [atomizer]
  696. * Fixed; preserve current path during `fillRect()` and `strokeRect()` [atomizer]
  697. * Fixed; `restorePath()`: clear current path before appending [atomizer]
  698. 0.5.3 / 2011-04-11
  699. ==================
  700. * Clamp image bounds in `PixelArray::PixelArray()` [Marcello Bastea-Forte]
  701. 0.5.2 / 2011-04-09
  702. ==================
  703. * Changed; make `PNGStream` a real `Stream` [Marcello Bastea-Forte]
  704. 0.5.1 / 2011-03-16
  705. ==================
  706. * Fixed (kinda) `img.src=` error handling
  707. * Fixed; move closure.h down for malloc ref. Closes #80
  708. 0.5.0 / 2011-03-14
  709. ==================
  710. * Added several more operators (color-dodge, color-burn, difference, etc)
  711. * Performance; no longer re-allocating `closure->data` for each png write
  712. * Fixed freeing of `Context2d` states
  713. * Fixed text alignment / baseline [Olaf]
  714. * Fixed HandleScopes [Olaf]
  715. * Fixed small misc memory leaks
  716. * Fixed `Buffer` usage for node 0.4.x
  717. 0.4.3 / 2011-01-11
  718. ==================
  719. * Fixed font family dereferencing. Closes #72
  720. * Fixed; stripping of quotes from font-family before applying
  721. * Fixed duplicate textAlign getter
  722. * Removed sans-serif default of _Arial_
  723. 0.4.2 / 2010-12-28
  724. ==================
  725. * Fixed font size growing issue after successive calls. Closes #70
  726. 0.4.1 / 2010-12-18
  727. ==================
  728. * Fixed; toString() first argument of `{fill,stroke}Text()`. Closes #68
  729. 0.4.0 / 2010-12-12
  730. ==================
  731. * Added `drawImage()` with `Canvas` instance support. Closes #67
  732. 0.3.3 / 2010-11-30
  733. ==================
  734. * Added `CanvasRenderingContext2d#patternQuality` accessor, accepting _fast_, _good_, and _best_
  735. * Fixed; pre-multiply `putImageData()` components
  736. * Fixed; `PixelArray` data is not premultiplied
  737. 0.3.2 / 2010-11-26
  738. ==================
  739. * Added --profile option to config
  740. * Fixed `eio_custom` segfault(s). Closes #46
  741. * Fixed two named colors. Closes #62 [thanks noonat]
  742. * Fixed a few warnings
  743. * Fixed; freeing data in `Image::loadJPEG()` on failure
  744. * Fixed; include _jpeglib_ only when __HAVE_JPEG__
  745. * Fixed; using `strstr()` instead of `strnstr()`
  746. 0.3.1 / 2010-11-24
  747. ==================
  748. * Fixed; `Image` loading is sync until race-condition is resolved
  749. * Fixed; `Image::loadJPEG()` return status based on errno
  750. 0.3.0 / 2010-11-24
  751. ==================
  752. * Added arcTo(). Closes #11
  753. * Added c color parser, _./examples/ray.js_ is now twice as fast
  754. * Fixed `putImageData()` bug messing up rgba channels
  755. 0.2.1 / 2010-11-19
  756. ==================
  757. * Added image _resize_ example
  758. * Fixed canvas resizing via `{width,height}=`. Closes #57
  759. * Fixed `Canvas#getContext()`, caching the CanvasRenderingContext
  760. * Fixed async image loading (test server still messed)
  761. 0.2.0 / 2010-11-18
  762. ==================
  763. * Added jpeg `Image` support (when libjpeg is available)
  764. * Added _hsl_ / _hsla_ color support. [Tom Carden]
  765. 0.1.0 / 2010-11-17
  766. ==================
  767. * Added `Image`
  768. * Added `ImageData`
  769. * Added `PixelArray`
  770. * Added `CanvasRenderingContext2d#drawImage()`
  771. * Added `CanvasRenderingContext2d#getImageData()`
  772. * Added `CanvasRenderingContext2d#createImageData()`
  773. * Added kraken blur benchmark example
  774. * Added several new tests
  775. * Fixed instanceof checks for many c++ methods
  776. * Fixed test runner in firefox [Don Park]
  777. 0.0.8 / 2010-11-12
  778. ==================
  779. * Added `CanvasRenderingContext2d#drawImage()`
  780. * Fixed `free()` call missing stdlib
  781. * Fixed Image#{width,height} initialization to 0
  782. * Fixed; load image on non-LOADING state
  783. 0.0.7 / 2010-11-12
  784. ==================
  785. * Fixed _lighter_ for older versions of cairo
  786. 0.0.6 / 2010-11-12
  787. ==================
  788. * Added `Image`
  789. * Added conditional support for cairo 1.10.0 operators
  790. 0.0.5 / 2010-11-10
  791. ==================
  792. * Added custom port support to _test/server.js_
  793. * Added more global composite operator support
  794. * Added `Context2d#antialias=`
  795. * Added _voronoi_ example
  796. * Added -D__NDEBUG__ to default build
  797. * Added __BUFFER_DATA__ macro for backwards compat buffer data access [Don Park]
  798. * Fixed getter bug preventing patterns from being returned via `fillStyle` etc
  799. * Fixed; __CAIRO_STATUS_NO_MEMORY___ on failed {re,m}alloc()
  800. * Fixed; free `Canvas::ToBuffer()` closure data
  801. 0.0.4 / 2010-11-09
  802. ==================
  803. * Bump to fix npm engine cache bug...
  804. 0.0.3 / 2010-11-09
  805. ==================
  806. * Added async `toDataURL()` support
  807. * Added async `toBuffer()` support
  808. * Removed buffer utils
  809. 0.0.2 / 2010-11-08
  810. ==================
  811. * Added shadow support (faster/better gaussian blur to come)
  812. * Added node v0.3 support [Don Park]
  813. * Added -O3 to build
  814. * Removed `Canvas#savePNG()` use `Canvas#createPNGStream()`
  815. 0.0.1 / 2010-11-04
  816. ==================
  817. * Initial release
  818. [repo]: https://github.com/Automattic/node-canvas