-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,140 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<br> | ||
|
||
<p align="center"> | ||
<img src="client/src/assets/images/logo.png" width="350" title="Pixel Artify"> | ||
</p> | ||
|
||
## About The Project | ||
|
||
Pixel Artify is a web-based tool for transforming images into pixel art. Try it out at [https://pixelartify.com](https://pixelartify.com)! | ||
|
||
![Demo Screenshot](client/src/assets/images/demo-screenshot.png) | ||
|
||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
This project requires Node.js which can be installed [here](https://nodejs.org/en/). | ||
|
||
### Development Setup | ||
|
||
1. Clone the repo: | ||
|
||
```sh | ||
|
||
git clone https://github.com/shannonlui/pixel-artify.git | ||
|
||
``` | ||
|
||
2. Install the required dependencies in the client directory: | ||
|
||
```sh | ||
|
||
cd client | ||
npm install | ||
|
||
``` | ||
|
||
4. Run the client app in development mode: | ||
|
||
```js | ||
|
||
npm start | ||
|
||
``` | ||
|
||
|
||
## Features | ||
- [x] Pixelate uploaded images with customizable pixel size | ||
- [x] Adjust contrast, brightness, saturation, and color palette | ||
- [x] Paint, erase and color selection on canvas | ||
- [ ] Resizable canvas and image export | ||
- [ ] Zooming and panning the canvas | ||
- [ ] Undo or redo changes | ||
|
||
|
||
## Acknowledgments | ||
This project was built using [React.js](https://reactjs.org/), Redux, and the following libraries: | ||
|
||
* [Color Thief](https://github.com/lokesh/color-thief) | ||
* [FileSaver.js](https://github.com/eligrey/FileSaver.js/) | ||
* [Pica](https://github.com/nodeca/pica) | ||
* [React Color](https://github.com/casesandberg/react-color) | ||
* [React Icons](https://github.com/react-icons/react-icons) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
|
||
import styles from './Button.module.css'; | ||
|
||
function Button(props) { | ||
const { children, className, primary, secondary, small, ...otherProps } = props; | ||
const classNames = [styles.button, className, primary && styles.primary, | ||
secondary && styles.secondary, small && styles.small]; | ||
|
||
return ( | ||
<button type="button" {...otherProps} className={classNames.join(' ')}> | ||
<span className={styles.label}>{children}</span> | ||
</button> | ||
); | ||
} | ||
|
||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.button { | ||
background-color: #ef6461; | ||
border: none; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
color: white; | ||
font-weight: bold; | ||
text-transform: uppercase; | ||
cursor: pointer; | ||
} | ||
|
||
.primary { | ||
background-color: #1c9197; | ||
} | ||
|
||
.secondary { | ||
background-color: grey; | ||
} | ||
|
||
.small { | ||
font-size: 0.8em; | ||
} | ||
|
||
.label { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.label svg { | ||
margin-right: 5px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
.control { | ||
color: white; | ||
margin-bottom: 64px; | ||
margin-bottom: 40px; | ||
} | ||
|
||
.control .label { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-bottom: 10px; | ||
margin-bottom: 2px; | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { FiX } from 'react-icons/fi'; | ||
|
||
import styles from './Modal.module.css'; | ||
import Button from '../Button/Button'; | ||
|
||
function Modal(props) { | ||
return ( | ||
<div className={styles.background} onClick={props.onClose}> | ||
<div className={styles.modal} onClick={e => e.stopPropagation()}> | ||
<button onClick={props.onClose} className={styles.closeBtn}><FiX /></button> | ||
{ | ||
props.header && <div className={styles.header}> | ||
{props.header} | ||
</div> | ||
} | ||
{ props.header && <hr /> } | ||
<div className={styles.body}> | ||
{props.children} | ||
</div> | ||
<div className={styles.footer}> | ||
<Button onClick={props.onClose} secondary>Cancel</Button> | ||
<Button onClick={props.onSubmit} primary>Ok</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Modal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.background { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: rgba(0, 0, 0, 0.6); | ||
z-index: 20; | ||
} | ||
|
||
.modal { | ||
position: relative; | ||
background: #444; | ||
min-width: 250px; | ||
width: 40%; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%,-50%); | ||
z-index: 100; | ||
border-radius: 5px; | ||
color: white; | ||
overflow-y: scroll; | ||
} | ||
|
||
.header { | ||
font-size: 1.2em; | ||
font-weight: bold; | ||
padding: 24px; | ||
margin-right: 24px; | ||
color: #ddd; | ||
} | ||
|
||
.closeBtn { | ||
position: absolute; | ||
top: 24px; | ||
right: 24px; | ||
font-size: 1.4em; | ||
cursor: pointer; | ||
color: white; | ||
background: none; | ||
border: none; | ||
} | ||
|
||
.body { | ||
padding: 24px; | ||
margin-bottom: 60px; | ||
min-height: 100px; | ||
height: 50%; | ||
overflow: auto; | ||
} | ||
|
||
.footer { | ||
position: absolute; | ||
bottom: 24px; | ||
right: 24px; | ||
} | ||
|
||
.footer button { | ||
margin-left: 12px; | ||
} | ||
|
||
@media only screen and (max-width: 400px) { | ||
.header { | ||
font-size: 1em; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
height: 8px; | ||
outline: none; | ||
border: none; | ||
background: #ddd; | ||
} | ||
|
||
.slider::-webkit-slider-thumb { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const TOOL_TYPES = { | ||
PAINT: "PAINT", | ||
COLOR_PICK: "COLOR_PICK", | ||
ERASE: "ERASE" | ||
} |
Oops, something went wrong.