bevyengine / bevyengine/bevy

Consider re-exporting image crate

Open
#12,689 3 comments 1 reaction 0 assignees View on GitHub
A-Rendering C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

I would like to use functions from the image crate to perform manipulations on images
such as crop, overlay, etc.

## What solution would you like?

Please consider moving the image dependency from an internal dependency in bevy_render
to a re-exported library in bevy_utils, similar to how hashbrown and others are exported.

## What alternative(s) have you considered?

Currently I can add image as a dependency to my crate, but this means I have to ensure
that I keep my version in parity with what Bevy is using internally.

## Additional context

Bevy is awesome and I look forward to many years of developing games and tools against it.

I think that having the ability to manipulate image data in RAM could be a useful tool
for certain use cases. I am writing an importer for the LDtk editor, and made the decision
to build up internal Image assets myself for the layers, as opposed to the strategy
from other crates of creating a sprite for each tile.

Here's an example of my (unpublished!) work, showing my use case:
[bevy_ldtk_asset](https://github.com/stinkytoe/bevy_ldtk_asset/blob/6f1e79f2b8987c03e5daa3913df5b5c0618adecf/src/assets/level.rs#L444)

Exporting the image crate would be a small quality of life improvement for me, and
possibly others, who wish to utilize the full extent of the image crate within Bevy.

Contributor guide

Open the contributing guide

Research direction

Compare the image dependency in bevy_render with the existing hashbrown and similar exports in bevy_utils. Confirm the intended public re-export location and verify that the image crate can be used through Bevy without requiring a separately pinned dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.