Photo to Oil Painting Converter

Transform any image into a rich oil painting using frequency-based brushstroke logic. Adjust brush size, boost color saturation, and emulate traditional canvas art — all locally in your browser.

Supports JPG, PNG, WEBP. Max dimension auto-scaled for performance.
Fine (3)7Bold (15)
Try sample:
?️ Landscape
? Portrait
? Still Life
Zero data upload – All image processing occurs locally on your device. No server storage, no tracking.
Original photo
Oil painting result
Processing...

Why use this oil painting simulator?

Our engine mimics traditional oil painting through a dominant-color brushstroke algorithm (local mode filter). Unlike generic filters that blur or pixelate, this method preserves strong edges while replacing local color variations with coherent color clusters — the result is a harmonious blend of photorealism and artistic abstraction, reminiscent of pointillist and expressionist techniques.

? Core algorithm: sliding window color majority

For each pixel (x,y), we examine a square neighborhood of size s (brush diameter). The most frequent color (mode) inside that window replaces the original pixel. This creates clustered paint dabs that emulate thick oil strokes while preserving major contours. Mathematically:

H(x,y) = Mode{ C(i,j) | |i-x| ≤ r, |j-y| ≤ r } where r = brushRadius.

The color frequency is evaluated using a 24-bit RGB hash, ensuring high fidelity to local chromatic masses. Optional “vivid mode” applies a gentle saturation boost after filtering to enhance visual richness.

How the oil painting effect works — step by step

  1. Image resizing – The image is scaled to a reasonable size (max 800px) for fast processing.
  2. Brush window sampling – For each pixel, the algorithm collects all colors inside a square of size brushSize (e.g., 7×7).
  3. Color mode selection – The most frequent RGB color in that window becomes the new pixel value. This eliminates fine noise and unifies similar hues into a single “stroke”.
  4. Saturation boost (optional) – If vivid mode is enabled, the algorithm increases chroma by ~20% without clipping, making colors more vibrant like wet oil paint.

Heritage and artistic relevance

Oil painting has shaped Western art for centuries, from the Flemish Primitives to Van Gogh’s impasto. Our digital simulation respects two key properties: chromatic consolidation (reducing noise into coherent color patches) and edge preservation (contours remain sharp, emulating brush direction changes). The adjustable brush size lets users simulate fine detail work (small brushes) or broad expressive passages (large palette knife).

Practical example: turning a family portrait into a canvas-style keepsake

Imagine uploading an old photograph — with brush size 7 and vivid mode enabled, the output shows distinct brush-like clusters in the skin tones and clothing, while facial features remain recognizable. This is ideal for creating personalized gifts, social media art, or print-ready posters. The non‑destructive local processing gives you full creative control without sending data to any external server.

Algorithm transparency & performance

The mode filter is a well‑known edge‑preserving smoothing technique used in non‑photorealistic rendering (NPR). Unlike mean or Gaussian blur, which destroy edges, the mode filter retains strong boundaries because neighboring regions with different dominant colors stay distinct. This property is what authentically replicates the look of oil painting. Our implementation is pure JavaScript + Canvas 2D API, with no external libraries or AI models. Processing time for an 800×600 image with brush size 9 is typically < 1 second on modern devices.

Brush size range Visual effect Best for
3–5 Fine grain, almost pointillist Portraits, detailed illustrations
7–9 Classic oil brush, visible strokes Landscapes, still life, general photos
11–15 Heavy impasto, abstract clusters Expressionist art, high-impact posters

Ideal use cases

  • Digital art exploration – Generate base oil textures for further manual overpainting.
  • Print-on-demand services – Convert customer photos into oil‑style prints.
  • Game textures – Create hand‑painted environment assets from real‑world references.
  • Art therapy & social media – Transform casual shots into emotionally resonant painterly images.
  • Teaching color theory – Demonstrate how local color averaging creates visual harmony.

Why mode filtering outperforms averaging for oil painting

Average blur (mean filter) produces muddy, plastic-like results because it blends contrasting colors. Mode filtering selects the most frequent color, effectively “voting” for the dominant hue. This preserves edges (adjacent areas with different dominant colors remain distinct) and generates the characteristic broken color effect of impressionist and post‑impressionist paintings. The optional vivid mode applies a post‑processing saturation enhancement using a simple gamma‑adjusted HSV scaling — a common and transparent technique to boost perceived color richness without over‑saturation artifacts.

Built on open principles – This tool implements a classic NPR algorithm (local mode filter) as described in numerous public resources (e.g., “Digital Image Processing” by Gonzalez & Woods, and various SIGGRAPH tutorials). The source code is self‑contained, runs entirely client‑side, and makes no claims of external validation or institutional endorsement. It is provided as‑is for educational and creative purposes. For technical details, the mode filter logic is explained above and can be inspected via browser developer tools.

Fully transparent, no hidden tracking, and completely free.

Frequently Asked Questions

No, the oil effect is purely algorithmic (mode filter + optional saturation boost). No neural networks, no cloud processing — 100% deterministic, privacy-friendly, and fast.

Absolutely. The resulting image belongs entirely to you. We do not claim any rights. Use it for prints, book covers, merchandise, or any other project.

A larger brush size examines more pixels per output pixel, increasing computational work. Images are automatically scaled (max 800px width/height) to ensure responsive performance.

Photoshop uses a proprietary combination of lighting, shading, and stroke direction simulation. Our mode‑based filter is simpler, fully transparent, and web‑native — giving you an authentic ‘color cluster’ oil look without any GPU dependency or hidden costs.

Use well-lit photos with distinct color areas. Start with brush size 7, enable vivid mode for richer tones, then increase brush size up to 11 for stronger impasto feel. Avoid extremely low-resolution images.