# jpeg-convert

> image convert in jpeg extension

Latest version **1.0.26** (published 2023-01-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install jpeg-convert
pnpm add jpeg-convert
yarn add jpeg-convert
bun add jpeg-convert
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.26 |
| Published | 2023-01-04 |
| First published | 2022-12-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | vraj panagar |
| Maintainers | vraj1599 |
| Keywords | jpeg, image |

## Links

- npm: https://www.npmjs.com/package/jpeg-convert
- Repository: https://github.com/vraj1599/image-jpeg-convert
- Homepage: https://github.com/vraj1599/image-jpeg-convert#readme
- Issues: https://github.com/vraj1599/image-jpeg-convert/issues
- npm.io page: https://npm.io/package/jpeg-convert

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.0.26 (latest) — 2023-01-04
- 1.0.25 — 2023-01-04
- 1.0.24 — 2023-01-04
- 1.0.23 — 2023-01-04
- 1.0.22 — 2023-01-04
- 1.0.21 — 2023-01-04
- 1.0.20 — 2023-01-04
- 1.0.19 — 2023-01-04
- 1.0.18 — 2023-01-04
- 1.0.17 — 2023-01-04
- 1.0.16 — 2023-01-04
- 1.0.15 — 2022-12-29
- 1.0.14 — 2022-12-29
- 1.0.13 — 2022-12-29
- 1.0.12 — 2022-12-29
- … 12 more at https://npm.io/package/jpeg-convert/versions

## README

��# Example
---
**NOTE**
```
import './App.css';
import { useState } from 'react';
import jpegConveter from 'jpeg-convert';

function App() {
  const [image,setImage] = useState();
  const readFileAsync = (file) => new Promise((resolve, reject) => {
    const reader = new FileReader();
    reader.onload = () => {
      resolve(reader.result);
    };
    reader.onerror = reject;
    reader.readAsDataURL(file);
  });
  const handleChange = async (name,value) => {
    console.log(value);
    const fileArray = jpegConveter(value);
    const result =  await readFileAsync(fileArray);
    const [, fileContent] = result.split(',');
    setImage(fileContent);
    console.log('data', fileArray);
  } 
  return (
    <div className="App">
     <input type="file" onChange={(e)=>{handleChange('hello',e.target.files[0])}}/>
     <img src={`data:image/jpeg;base64,${image}`} alt="hello" sizes="max-width: 710px) 120px,
            (max-width: 991px) 193px,
            278px"/>
    </div>
  );
}

export default App;
```
---

---
_Source: https://npm.io/package/jpeg-convert · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
