<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ramin</title>
    <description>The latest articles on DEV Community by Ramin (@raminmousavi).</description>
    <link>https://dev.to/raminmousavi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F832112%2F501b8662-dbe5-497b-a5a7-bc18b809ba5b.png</url>
      <title>DEV Community: Ramin</title>
      <link>https://dev.to/raminmousavi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raminmousavi"/>
    <language>en</language>
    <item>
      <title>Pikaso now supports NodeJs</title>
      <dc:creator>Ramin</dc:creator>
      <pubDate>Sun, 12 Jun 2022 11:13:56 +0000</pubDate>
      <link>https://dev.to/raminmousavi/pikaso-now-supports-nodejs-3p9k</link>
      <guid>https://dev.to/raminmousavi/pikaso-now-supports-nodejs-3p9k</guid>
      <description>&lt;p&gt;As of version &lt;a href="https://github.com/pikasojs/pikaso/releases/tag/v2.7.0"&gt;2.7.0&lt;/a&gt;, NodeJs is supported. &lt;br&gt;
This will enable collaboration between backend and frontend sides in creating images.&lt;/p&gt;

&lt;p&gt;Using Pikaso in a NodeJs environment is similar to using it in a browser.&lt;/p&gt;

&lt;p&gt;Note that you must install &lt;code&gt;node-canvas&lt;/code&gt; separately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install canvas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { Pikaso } = require('pikaso')

const editor = new Pikaso({
  width: 800,
  height: 600
})

editor.shapes.circle.insert({
  x: 200,
  y: 200,
  radius: 40,
  fill: 'blue'
})

const base64Url = editor.export.toImage()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Github:&lt;br&gt;
&lt;a href="https://github.com/pikasojs/pikaso"&gt;https://github.com/pikasojs/pikaso&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Website:&lt;br&gt;
&lt;a href="https://pikaso.app"&gt;https://pikaso.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pikaso</category>
      <category>node</category>
      <category>canvas</category>
      <category>image</category>
    </item>
    <item>
      <title>Pikaso v2.6 released</title>
      <dc:creator>Ramin</dc:creator>
      <pubDate>Mon, 16 May 2022 22:23:02 +0000</pubDate>
      <link>https://dev.to/raminmousavi/pikaso-v26-released-4lld</link>
      <guid>https://dev.to/raminmousavi/pikaso-v26-released-4lld</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/pikasojs/pikaso"&gt;Pikaso&lt;/a&gt; v2.6 was released. The release contains a number of bug fixes and new features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introducing Background Size
&lt;/h3&gt;

&lt;p&gt;From v2.6.0, both &lt;code&gt;editor.loadFromUrl&lt;/code&gt; and &lt;code&gt;editor.loadFromFile&lt;/code&gt; accept a second parameter with this interface&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;BackgroundOptions&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;auto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resize&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;contain&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stretch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;
  &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;size&lt;/code&gt; field describes how a background image should be loaded in the canvas. The functionality is the same as the CSS feature &lt;code&gt;background-size&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loadFromUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;url&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// resizes canvas to to file's size by default&lt;/span&gt;

&lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loadFromUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;url&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cover&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loadFromFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;File&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;stretch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Improve Label Shape
&lt;/h3&gt;

&lt;p&gt;Labels can now be resized from different perspectives.&lt;br&gt;
The following configuration should be followed to enable resizing from different aspects:&lt;br&gt;
&lt;code&gt;keepScale&lt;/code&gt; will be accessible as of &lt;code&gt;v2.6.0&lt;/code&gt; and by setting that to false, the default scaling behavior will be disabled.&lt;br&gt;
Also, all options for &lt;a href="https://konvajs.org/api/Konva.Transformer.html"&gt;&lt;code&gt;Konva.Transformer&lt;/code&gt;&lt;/a&gt; are available through &lt;code&gt;transformer&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;editor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shapes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* config */&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* config */&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="cm"&gt;/* config */&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;keepScale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// By setting keepScale to false, the default scaling behavior will be disabled&lt;/span&gt;
      &lt;span class="na"&gt;transformer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;keepRatio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// keepRatio set to true to maintain scaling when scaling from corners&lt;/span&gt;
        &lt;span class="na"&gt;enabledAnchors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;middle-left&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;middle-right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bottom-right&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// Here are all the options available https://konvajs.org/api/Konva.Transformer.html#enabledAnchors__anchor&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Improve Export/Import
&lt;/h3&gt;

&lt;p&gt;zIndex export/import is now supported.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Pikaso v2.5.0 is released</title>
      <dc:creator>Ramin</dc:creator>
      <pubDate>Mon, 28 Mar 2022 11:57:07 +0000</pubDate>
      <link>https://dev.to/raminmousavi/pikaso-v250-is-released-38d6</link>
      <guid>https://dev.to/raminmousavi/pikaso-v250-is-released-38d6</guid>
      <description>&lt;p&gt;I am pleased to announce the release of version 2.5.0 today.&lt;/p&gt;

&lt;p&gt;This release includes one new feature and one important improvement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduce Measurement Tag
&lt;/h3&gt;

&lt;p&gt;Resize the red box to see how it works:&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/raminmousavi/embed/RwxVQLE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Improve SVG drawing
&lt;/h3&gt;

&lt;p&gt;To achieve a smoother drawing experience, the logic for drawing SVG paths has been reimplemented.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fS0tWeLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/334716/160384156-236017d4-7463-41c6-98db-1b4e89c7b565.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fS0tWeLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/334716/160384156-236017d4-7463-41c6-98db-1b4e89c7b565.gif" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click and drag the mouse to see what it looks like:&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/raminmousavi/embed/abEWqeK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Pencil Drawing
&lt;/h3&gt;

&lt;p&gt;Pencil Drawings have a minor difference in that, unlike other shapes, they begin a new drawing when the current one ends.&lt;br&gt;
The &lt;code&gt;editor.shapes.pencil.stopDrawing()&lt;/code&gt; method or &lt;code&gt;editor.board.setActiveDrawing(null)&lt;/code&gt; method must be called in order to stop pencil drawing.&lt;/p&gt;

&lt;p&gt;Draw something cool and then hit the "esc" key on your keyboard to finish the drawing.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/raminmousavi/embed/VwybXLO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Pikaso's full feature list is available at &lt;a href="https://pikaso.app"&gt;https://pikaso.app&lt;/a&gt; and &lt;a href="https://github.com/pikasojs/pikaso"&gt;https://github.com/pikasojs/pikaso&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The JS canvas editor Pikaso has been around for a year</title>
      <dc:creator>Ramin</dc:creator>
      <pubDate>Thu, 17 Mar 2022 10:51:47 +0000</pubDate>
      <link>https://dev.to/raminmousavi/the-js-canvas-editor-pikaso-has-been-around-for-a-year-1hh5</link>
      <guid>https://dev.to/raminmousavi/the-js-canvas-editor-pikaso-has-been-around-for-a-year-1hh5</guid>
      <description>&lt;p&gt;Pikaso, an open source library I created, has just been updated to version &lt;a href="https://www.npmjs.com/package/pikaso/"&gt;2.4.0&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It added a lot of new features to the core library in that &lt;a href="https://github.com/pikasojs/pikaso/releases/tag/v2.4.0"&gt;release&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It seems like a good time to introduce the library here since I believe it might be useful to the community.&lt;/p&gt;

&lt;p&gt;In essence, &lt;a href="https://github.com/pikasojs/pikaso"&gt;Pikaso&lt;/a&gt; is a seamless, &lt;a href="https://github.com/pikasojs/pikaso/tree/master/src/types"&gt;fully typed&lt;/a&gt; and &lt;a href="https://app.codacy.com/gh/pikasojs/pikaso/dashboard"&gt;fully tested&lt;/a&gt; library that includes a lot of features out of the box that make working with canvas incredibly easy.&lt;/p&gt;

&lt;p&gt;It provides all basic shapes, pencil and shape drawing, images and filters, SVG, groups management, flip, rotation, export to image and json, import from json, events, undo/redo, snap to grid and many other features.  (more)&lt;/p&gt;

&lt;p&gt;Additionally, it comes with a powerful &lt;a href="https://pikaso.app/#/core/cropper"&gt;cropper&lt;/a&gt; with four modes.&lt;/p&gt;

&lt;p&gt;Almost every feature, such as color, style, and anything else, can be &lt;a href="https://pikaso.app/#/getting-started/configuration"&gt;customized&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This library can be used with any library, such as &lt;a href="https://codesandbox.io/s/pikaso-react-hook-example-i0uwg"&gt;React&lt;/a&gt;, Angular, &lt;a href="https://codesandbox.io/s/vue3-example-o3cig"&gt;Vue&lt;/a&gt;, Svelte or Vanilla Js&lt;br&gt;
In addition to contributing the library, I am constantly adding new features to it.&lt;/p&gt;

&lt;p&gt;With Pikaso, you can design your own image cropper, Social Network image editor, T-shirt maker, avatar maker, Canva-like app, or even create your own Figma-style app.&lt;/p&gt;

&lt;p&gt;More details can be found in the Github repository &lt;a href="https://github.com/pikasojs/pikaso"&gt;https://github.com/pikasojs/pikaso&lt;/a&gt; and you can view the documentation and demos at &lt;a href="https://pikaso.app"&gt;https://pikaso.app&lt;/a&gt; or &lt;a href="https://pikaso.app/api/classes/Pikaso.html"&gt;API reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for giving the &lt;a href="https://github.com/pikasojs/pikaso"&gt;project&lt;/a&gt; a Github star if you liked it, because it will help others find the project and trust that, and it motivates me to spend more time on it. Appreciate it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/pikasojs/pikaso"&gt;https://github.com/pikasojs/pikaso&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
