Giter VIP home page Giter VIP logo

pigmnts's Introduction

Hey there ๐Ÿ‘‹
I'm

About ๐ŸŒ

  • I build innovative and useful products on the web with great user experience.
  • I'm curious about how things work and often try to learn by breaking them apart.

Work ๐Ÿ”ญ

  • Software development engineer at Razorpay (Present).
  • Software development engineering intern at Razorpay in spring 2022.
  • Software engineering intern at Akamai Technologies in summer 2021.
  • Frontend engineering intern at smallcase in summer 2020.
  • Building Slant it and Blaze in my free time.

Current Interests ๐ŸŒฑ

Ask me about ๐Ÿ’ฌ

  • Frontend development
  • UI design
  • Open source

Get in touch ๐Ÿ“ซ

Fun facts โšก

  • I occasionally work on 3D graphics with Blender
  • I enjoy playing Tennis ๐ŸŽพ

Amazing folks who sponsor my work ๐Ÿ’š


Shivay Lamba

Aniruddha Mysore

pigmnts's People

Contributors

blenderskool avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pigmnts's Issues

Segmentation Fault

Hey!

I'm getting a segmentation fault on a M1 Macbook Pro running Sonoma 14.0.

pigmnts test.png -xrd
Creating a palette of 5 colors from test.png
โ ธ
[1]    16785 segmentation fault  pigmnts test.png -xrd

Any logs I can check to see how to fix this?

Try L*ab color space

L*ab color space resembles humans' perception of colors. It may give better results compared to RGBA.

Update README

Update the README with the updated return of pigments_pixels function

Pigmnts causes problems with Glowforge

When running the Pigmnts add-on, interactions on app.glowforge.com are negatively affected. Mouseover events on certain interface elements (such as the zoom in/out buttons) cause the entire screen to go white.

This may be a highly-specific problem, but it could also be an indication that the Pigmnts add-on causes issues on other sites.

Some of the errors from the console:

Error: Permission denied to access property "offsetParent"
u https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
h https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
A https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
onLoad https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
e https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
e https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
q https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
W https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
hc https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
unstable_runWithPriority https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
qi https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
pc https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
tc https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Ki https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
unstable_runWithPriority https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
qi https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Ki https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Vi https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Zs https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
vo https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
i https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
ye https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
current https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
nrWrapper https://app.glowforge.com/:11
setTimeout handler*nrWrapper https://app.glowforge.com/:11
_e https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
s https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
u https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
v https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
v https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
ot https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
it https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
st https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
ut https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
N https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
U https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Jt https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Qt https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
unstable_runWithPriority https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Zt https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
nrWrapper https://app.glowforge.com/:11
fs.js:3:18231

LOG_ERROR Rendering error in
in div
in ForwardRef
in ForwardRef
in ForwardRef
in ForwardRef
in ToolbarButton
in forwardRef(ToolbarButton)
in div
in div
in o
in x
in o
in div
in o
in h
in o
in x
in withContentfulPage(workspace)
in x
in x
in div
in Unknown
in P8
in x
in RouterContext
in Router
in l
in i Error: Permission denied to access property "offsetParent"
u https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
h https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
A https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
onLoad https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
e https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
e https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
q https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
W https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
hc https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
unstable_runWithPriority https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
qi https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
pc https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
tc https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Ki https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
unstable_runWithPriority https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
qi https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Ki https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Vi https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Zs https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
vo https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
i https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
ye https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
current https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
nrWrapper https://app.glowforge.com/:11
setTimeout handler*nrWrapper https://app.glowforge.com/:11
_e https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
s https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
u https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
v https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
v https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
ot https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
it https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
st https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
ut https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
N https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
U https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Jt https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Qt https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
unstable_runWithPriority https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
Zt https://cdn.glowforge.com/gf-web/vendor-v1-80b5a615c0f8bcf81ab9.js:2
nrWrapper https://app.glowforge.com/:11

Saga Stack: undefined fs.js:3:18231

Add validation so that only allow images

Currently one can upload any file type, I think it should be restricted to only images
If I upload a pdf (any other type) the loader didn't stop.
image

I would like to fix this.

Add support for HTTP image URLs

CLI could allow usage of HTTP and HTTPS image URLs where the image is fetched in the memory and then the palette is created from it

Isomorphic npm package

The library published on npm works only on the client-side. Support for the pigmnts library on server-side using Node.js can be implemented considering following points:

  • pigments_node() function can be implemented that is compatible with Node.js and does not depend on Browser APIs like canvas.
  • The existing pigments() function may depend on pigmnts_node() function making it easier to interact with the library on the client-side by abstracting canvas APIs.
  • Appropriate build system to create a single isomorphic package. wasm-pack supports multiple outputs targets, but combining them under a single package is a little messy. Hoping for this to be merged rustwasm/wasm-pack#705

Implement a CLI

pigmnts library can be used to build a CLI tool that can extract a color palette from an image.

Add support for other color formats

The results of the palette generated is in RGBA format (hex color in WASM).
Support for more color formats like HSL, L*ab, CMYK would be useful

CLI on Windows

CLI does not work on Windows since termion doesn't support Windows.

Sort based on dominance

The generated colors could be sorted based on its dominance in the image. Or even better, return the colors along with their dominance as a percentage.

Use threads for data parallelism

K-means (and K-means++) involve a lot of synchronous tasks which makes it difficult to achieve task parallelism. However, data parallelism may be achieved to improve the performance of certain areas in the process. MapReduce technique can be applied as a starting point in the Assignment step of the algorithm.

For the time being, this could be implemented using native std::thread and WebAssembly support can be thought of a little later once any improvements using threads are observed.

Output as HTML

CLI could output the palette as a HTML file. This would make it easy to preview the colors in the palette on terminals that don't support true colors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.