Skip to content

Commit 4d5aa19

Browse files
authored
Initial split into new repo (#1)
* Initial split into new repo * No lockfile in libs * Proper target build cmd * Review comments * Regenerate readme * Bump license year * Kludge changelog for split * CircleCI badge * Review tweaks * Ignore the right files * Fix changelog * Rename tag
1 parent 308f969 commit 4d5aa19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3202
-0
lines changed

.circleci/config.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Check that everything (tests, benches, etc) builds in std environments
2+
precheck_steps: &precheck_steps
3+
docker:
4+
- image: jamwaffles/circleci-embedded-graphics:1.40.0-cimg
5+
auth:
6+
username: jamwaffles
7+
password: $DOCKERHUB_PASSWORD
8+
steps:
9+
- checkout
10+
- restore_cache:
11+
key: v1-{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
12+
- run: rustup default ${RUST_VERSION:-stable}
13+
- run: rustup component add rustfmt
14+
- run: cargo update
15+
- run: just build
16+
- save_cache:
17+
key: v1-{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
18+
paths:
19+
- ./target
20+
- /home/circleci/.cargo/registry
21+
22+
# Build crates for embedded target
23+
target_steps: &target_steps
24+
docker:
25+
- image: jamwaffles/circleci-embedded-graphics:1.40.0-cimg
26+
auth:
27+
username: jamwaffles
28+
password: $DOCKERHUB_PASSWORD
29+
steps:
30+
- checkout
31+
- restore_cache:
32+
keys:
33+
- v1-{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
34+
- run: just install-targets
35+
- run: cargo update
36+
- run: just build-targets --release
37+
- save_cache:
38+
key: v1-{{ .Environment.CIRCLE_PROJECT_REPONAME }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Cargo.toml" }}
39+
paths:
40+
- ./target
41+
- /home/circleci/.cargo/registry
42+
43+
version: 2
44+
jobs:
45+
precheck-stable:
46+
<<: *precheck_steps
47+
precheck-beta:
48+
environment:
49+
- RUST_VERSION: "beta"
50+
<<: *precheck_steps
51+
52+
all-targets:
53+
<<: *target_steps
54+
55+
build_jobs: &build_jobs
56+
jobs:
57+
- precheck-stable
58+
- precheck-beta
59+
- all-targets
60+
61+
workflows:
62+
version: 2
63+
build_all:
64+
<<: *build_jobs

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: jamwaffles
4+
patreon:
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/ISSUE_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- Version of tinytga in use (if applicable): [version here]
2+
3+
## Description of the problem/feature request/other
4+
5+
[description here]
6+
7+
## Test case (if applicable)
8+
9+
```rust
10+
// Failing test case demonstrating the issue here
11+
```

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Thank you for helping out with tinytga development! Please:
2+
3+
- [ ] Check that you've added passing tests and documentation
4+
- [ ] Add a `CHANGELOG.md` entry in the **Unreleased** section under the appropriate heading (**Added**, **Fixed**, etc) if your changes affect the **public API**
5+
- [ ] Run `rustfmt` on the project
6+
- [ ] Run `just build` (Linux/macOS only) and make sure it passes. If you use Windows, check that CI passes once you've opened the PR.
7+
8+
## PR description
9+
10+
[add your PR description here]

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.vscode/
2+
target/
3+
**/*.rs.bk
4+
Cargo.lock
5+
.DS_Store
6+
.idea/

CHANGELOG.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Changelog
2+
3+
[`tinytga`](https://crates.io/crates/tinytga) is a no_std, low memory footprint TGA loading library for embedded applications.
4+
5+
<!-- next-header -->
6+
7+
## [Unreleased] - ReleaseDate
8+
9+
## [Unreleased - `embedded-graphics` repository] - ReleaseDate
10+
11+
> Note: PR numbers from this point onwards are from the old `embedded-graphics/embedded-graphics` repository. New PR numbers above this note refer to PRs in the `embedded-graphics/tinytga` repository.
12+
13+
### Changed
14+
15+
- **(breaking)** [#407](https://github.com/embedded-graphics/embedded-graphics/pull/407) The `image_descriptor` in `TgaHeader` was replaced by `image_origin` and `alpha_channel_bits`.
16+
- **(breaking)** [#420](https://github.com/embedded-graphics/embedded-graphics/pull/420) To support the new embedded-graphics 0.7 image API a color type parameter was added to `Tga`.
17+
- **(breaking)** [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) The `graphics` feature was removed and the `embedded-graphics` dependency is now non optional.
18+
- **(breaking)** [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) `Tga` no longer implements `IntoIterator`. Pixel iterators can now be created using the `pixels` and `raw_pixels` methods.
19+
- **(breaking)** [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) `Tga::from_slice` now checks that the specified color type matches the bit depth of the image.
20+
- **(breaking)** [#450](https://github.com/embedded-graphics/embedded-graphics/pull/450) The `TgaFooter` struct was replaced by the `developer_dictionary` and `extension_area` methods in `RawTga`.
21+
- **(breaking)** [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) `Tga::width` and `Tga::height` were replaced by `Tga::size` which requires `embedded_graphics::geometry::OriginDimensions` to be in scope (also included in the embedded-graphics `prelude`).
22+
- **(breaking)** [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) The color map can now be accessed using the new `ColorMap` type.
23+
- **(breaking)** [#450](https://github.com/embedded-graphics/embedded-graphics/pull/450) `Tga` no longer provides direct access to low level information like the TGA header, instead `Tga::as_raw` can be used to access the underlying `RawTga` instance.
24+
25+
### Added
26+
27+
- [#407](https://github.com/embedded-graphics/embedded-graphics/pull/407) Added support for bottom-left origin images to `TgaIterator`.
28+
- [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) The image ID can now be accessed using `Tga::image_id`.
29+
- [#450](https://github.com/embedded-graphics/embedded-graphics/pull/450) Added `RawTga` to use `tinytga` without using a embedded-graphic color type.
30+
- [#450](https://github.com/embedded-graphics/embedded-graphics/pull/450) Added `Tga::from_raw` to convert a `RawTga` into a `Tga` object.
31+
- [#450](https://github.com/embedded-graphics/embedded-graphics/pull/450) Added `DynamicTga` to allow drawing of TGA images without a known color format at compile time.
32+
33+
### Fixed
34+
35+
- [#407](https://github.com/embedded-graphics/embedded-graphics/pull/407) Additional data in `pixel_data`, beyond `width * height` pixels, is now discarded by `TgaIterator`.
36+
- [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) Images with unsupported BPP values in the header no longer cause panics. Instead an error is returned by `Tga::from_slice`.
37+
- [#430](https://github.com/embedded-graphics/embedded-graphics/pull/430) Errors during the execution of a pixel iterator no longer cause panics. Instead the corrupted portion of the image is filled with black pixels.
38+
39+
## [0.3.2] - 2020-03-20
40+
41+
## [0.3.1] - 2020-02-17
42+
43+
- **(breaking)** [#247](https://github.com/embedded-graphics/embedded-graphics/pull/247) "reverse" integration of tinytga into [`embedded-graphics`](https://crates.io/crates/embedded-graphics). tinytga now has a `graphics` feature that must be turned on to enable embedded-graphics support. The `tga` feature from embedded-graphics is removed.
44+
45+
**Before**
46+
47+
`Cargo.toml`
48+
49+
```toml
50+
[dependencies]
51+
embedded-graphics = { version = "0.6.0-alpha.3", features = [ "tga" ]}
52+
```
53+
54+
Your code
55+
56+
```rust
57+
use embedded_graphics::prelude::*;
58+
use embedded_graphics::image::ImageTga;
59+
60+
let image = ImageTga::new(include_bytes!("../../../assets/patch.tga")).unwrap();
61+
display.draw(&image);
62+
```
63+
64+
**After**
65+
66+
`Cargo.toml`
67+
68+
```toml
69+
[dependencies]
70+
embedded-graphics = "0.6.0"
71+
tinytga = { version = "*", features = [ "graphics" ]}
72+
```
73+
74+
Your code
75+
76+
```rust
77+
use embedded_graphics::{prelude::*, image::Image};
78+
use tinytga::Tga;
79+
80+
let image = Tga::new(include_bytes!("../../../assets/patch.tga")).unwrap();
81+
let image = Image::new(&image);
82+
display.draw(&image);
83+
```
84+
85+
## 0.2.0
86+
87+
### Added
88+
89+
- [#217](https://github.com/embedded-graphics/embedded-graphics/pull/217) Added support for TGA files with color map.
90+
91+
### Fixed
92+
93+
- [#217](https://github.com/embedded-graphics/embedded-graphics/pull/217) Images without a TGA footer are now parsed correctly.
94+
- [#216](https://github.com/embedded-graphics/embedded-graphics/pull/216) Fixed integer overflow for some RLE compressed TGA files.
95+
- [#218](https://github.com/embedded-graphics/embedded-graphics/pull/218) Test README examples in CI and update them to work with latest crate versions.
96+
97+
<!-- next-url -->
98+
99+
[unreleased]: https://github.com/embedded-graphics/tinytga/compare/after-split...HEAD
100+
[unreleased - `embedded-graphics` repository]: https://github.com/embedded-graphics/embedded-graphics/compare/tinytga-v0.3.2...before-split
101+
[0.3.2]: https://github.com/embedded-graphics/embedded-graphics/compare/tinytga-v0.3.0...tinytga-v0.3.2
102+
[0.3.1]: https://github.com/embedded-graphics/embedded-graphics/compare/tinytga-v0.2.0...tinytga-v0.3.1

Cargo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[package]
2+
name = "tinytga"
3+
version = "0.3.2"
4+
description = "No-std, low memory footprint TGA image loader"
5+
authors = ["James Waples <[email protected]>"]
6+
edition = "2018"
7+
repository = "https://github.com/embedded-graphics/tinytga"
8+
documentation = "https://docs.rs/tinytga"
9+
categories = ["embedded", "no-std", "multimedia::images"]
10+
keywords = ["graphics", "embedded-graphics", "tga", "targa", "image"]
11+
readme = "./README.md"
12+
license = "MIT OR Apache-2.0"
13+
exclude = [
14+
"/.github/",
15+
"/.circleci/",
16+
".gitignore",
17+
]
18+
19+
[badges]
20+
circle-ci = { repository = "embedded-graphics/tinytga", branch = "master" }
21+
22+
[dev-dependencies]
23+
paste = "1.0"
24+
25+
[dependencies.nom]
26+
version = "5.1.0"
27+
default-features = false
28+
29+
[dependencies.embedded-graphics]
30+
# version = "=0.7.0-alpha.1"
31+
# TODO: Remove when a new e-g alpha is released
32+
git = "https://github.com/embedded-graphics/embedded-graphics"
33+
branch = "new-repo"

0 commit comments

Comments
 (0)