Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bexxmodd/paleatra
/ functions
Functions
36 in github.com/bexxmodd/paleatra
⨍
Functions
36
◇
Types & classes
8
↓ 3 callers
Method
get_dimensions
Get the image dimensions of this image buffer in a form of tuple
src/picture.rs:73
↓ 3 callers
Method
increment_count
Increment the color's count by one
src/colors.rs:49
↓ 3 callers
Method
measure_distance
Measure the distance from this color to other color. Distance is measure of how distinct is the other color from this. If this color is red and the ot
src/colors.rs:65
↓ 2 callers
Method
get_buffer
(&self)
src/picture.rs:239
↓ 2 callers
Function
get_colors_from
Generate ColorCount struct and calculates the number of occurrences of each color in a given image each image. # Arguments 'img' - A `DynamicImage` t
src/utils.rs:50
↓ 2 callers
Function
get_most_freq
Grabs the `n` most frequently present elements from the Binary Tree Map # Arguments set - Which is a tree set of ColorCount struct n - how many most
src/utils.rs:20
↓ 2 callers
Method
rotate_90degrees
Rotates palette image by 90 degrees.
src/picture.rs:62
↓ 1 callers
Method
cmp
(&self, other: &Self)
src/colors.rs:83
↓ 1 callers
Method
combine_pieces
Overlays the palette buffer on top of this buffer. This is done on an empty space preserved for palette boxes. # Arguments palette - image buffer tha
src/picture.rs:213
↓ 1 callers
Method
copy_img_into
Copies supplied dynamic image into this image buffer, while preserving the allocated space for frame borders # Arguments size - of the frame image -
src/picture.rs:167
↓ 1 callers
Method
fill_in_palette
(&mut self, top_colors: Vec<&ColorCount>)
src/picture.rs:200
↓ 1 callers
Method
paint_palette
Pains the palette with `n` boxes for top `n` colors. Algorithm fills the boxes with colored pixels and makes jumps between colored boxes with empty sp
src/picture.rs:44
↓ 1 callers
Method
save_img
Saves current buffer as an image. Image format will be set based on the provided path, which is expected to include the name of the new file. # Argum
src/utils.rs:103
Method
_set_layers_divider
Functions computes and sets the divider point for buffer and palette layers # Arguments placement - where palette is expected to be placed height - o
src/picture.rs:149
Method
compute_palette_size
Calculate the size of each color box for palette layer. Each box is a square and includes the space for a pillar, that divides boxes # Arguments leng
src/picture.rs:194
Method
eq
(&self, other: &Self)
src/colors.rs:89
Method
generate_hex
Converts the RGBA tuple of the color into a hex code string hex is all upper case and starts with 'x'. example view: `x2F3FB6` # Arguments color - RG
src/colors.rs:34
Method
grayscale
(img: &DynamicImage)
src/filters.rs:4
Method
hash
(&self, state: &mut H)
src/colors.rs:77
Method
invert_colors
(img: &DynamicImage)
src/filters.rs:8
Function
main
()
src/main.rs:21
Method
new
Constructor for the Palette which holds `n` number of color boxes # Arguments side_length - size of each side of the box n_boxes - number of color bo
src/picture.rs:26
Method
new
(w: TW, h: TH)
src/utils.rs:123
Method
new
Constructor which generates hex code of the color from RGBA and sets count to 1
src/colors.rs:17
Method
partial_cmp
(&self, other: &Self)
src/colors.rs:95
Function
test_color_construct
()
tests/colors_test.rs:7
Function
test_color_count_increment
()
tests/colors_test.rs:14
Function
test_color_generate_hex
()
tests/colors_test.rs:24
Function
test_color_measure_diff
()
tests/colors_test.rs:31
Function
test_compute_palette_size
()
tests/picture_test.rs:12
Function
test_create_palette
()
tests/picture_test.rs:27
Function
test_framedpic_constructor
()
tests/picture_test.rs:6
Function
test_get_colors_from
()
tests/utils_test.rs:28
Function
test_get_dimensions
()
tests/picture_test.rs:19
Function
test_get_most_freq
()
tests/utils_test.rs:9
Function
test_palette_rotation
()
tests/picture_test.rs:34