Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Jan 3, 2025
1 parent c2b4f97 commit fd7670b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ Mix.install([

alias Vix.Vips.{Image, Operation}

# Read an image
{:ok, img} = Image.new_from_file("profile.jpg")

# Create a thumbnail and optimize for web
{:ok, thumb} = Operation.thumbnail(img, 300)
{:ok, thumb} = Operation.thumbnail("profile.jpg", 300)
:ok = Image.write_to_file(thumb, "thumbnail.jpg", Q: 90, strip: true, interlace: true)
```

Expand All @@ -50,6 +47,9 @@ alias Vix.Vips.{Image, Operation}

### Basic Processing
```elixir
# Reading an image
{:ok, img} = Image.new_from_file("profile.jpg")

# Resize preserving aspect ratio
{:ok, resized} = Operation.resize(img, 0.5) # 50% of original size

Expand Down

0 comments on commit fd7670b

Please sign in to comment.