npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-image-quality

v1.0.1

Published

High-performance, zero-dependency native device-level image quality (blur, exposure, brightness) validation for React Native using Nitro Modules.

Readme

react-native-image-quality 📸⚡

High-performance, zero-dependency native device-level image quality (blur, overexposure, underexposure) validation for React Native built on Nitro Modules.

Features sub-10ms native execution in Swift (iOS) and Kotlin (Android) using 3x3 Sobel edge density and Laplacian variance analysis.


⚡ Why react-native-image-quality vs react-native-fast-opencv?

| Feature | react-native-image-quality | react-native-fast-opencv | | :--- | :--- | :--- | | App Bundle Size Impact | ~50 KB (Ultra-lightweight) | ~20 MB – 50 MB+ (Bundles full OpenCV C++ SDK) | | Dependencies | Zero C++ / SDK dependencies | Requires linking heavy OpenCV C++ frameworks & NDK | | Out-of-the-box Metrics | Ready-to-use blurScore, sharpEdgeRatio, tenengradScore, meanLuminance, reason | Requires writing custom OpenCV matrix/filter pipelines in JS/C++ | | Architecture | Modern Nitro Modules (Sub-10ms JSI speed) | JSI / Native C++ OpenCV wrappers | | Build & Setup | Clean automatic autolinking (pod install) | Complex NDK configuration, C++ toolchains, iOS OpenCV framework linking | | Memory Footprint | Extremely low (downsampled single-channel grayscale buffer) | High (allocates large OpenCV Mat matrices in memory) |


Installation

npm install react-native-image-quality react-native-nitro-modules
# OR
yarn add react-native-image-quality react-native-nitro-modules

iOS Setup

cd ios && pod install

Quick Start

import { validateImageQuality, ImageQuality } from 'react-native-image-quality'

// Option 1: Quick helper with automatic user feedback callback
const isValid = await validateImageQuality(photoPath, {
  onToast: (message) => showToast(message)
})

if (!isValid) {
  console.log("Photo quality rejected")
}

// Option 2: Direct raw metrics analysis
const result = await ImageQuality.analyzeImageQuality(photoPath)
console.log(result)
/*
{
  isValid: false,
  isBlurry: true,
  isDark: false,
  isWhite: false,
  blurScore: 195.4,
  sharpEdgeRatio: 0.008,
  tenengradScore: 450.2,
  meanLuminance: 91.0,
  stdDevLuminance: 75.3,
  overexposedRatio: 0.0,
  underexposedRatio: 0.36,
  reason: 'IMAGE_BLURRY'
}
*/

Integration Examples

React Native VisionCamera

const photoFile = await camera.current.takePhoto()
const photoPath = Platform.OS === 'android' ? `file://${photoFile.path}` : photoFile.path

const isValid = await validateImageQuality(photoPath, {
  onToast: (msg) => Toast.show(msg)
})

if (isValid) {
  saveAttachment(photoPath)
}

react-native-image-crop-picker

const response = await ImagePicker.openCamera({ forceJpg: true })

const isValid = await validateImageQuality(response.path, {
  onToast: (msg) => Toast.show(msg)
})

if (isValid) {
  uploadFile(response.path)
}

License

MIT © Avinash