putz u in dhe washing machin and spins ur bsky pofile pictuer !!! :D
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rotate & save image

did:plc:73gqgbnvpx5syidcponjri… 8e6884cc 02045cee

verified
+370
+1
.gitignore
··· 1 1 /target 2 + /input
+351
Cargo.lock
··· 3 3 version = 4 4 4 5 5 [[package]] 6 + name = "ab_glyph" 7 + version = "0.2.32" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" 10 + dependencies = [ 11 + "ab_glyph_rasterizer", 12 + "owned_ttf_parser", 13 + ] 14 + 15 + [[package]] 16 + name = "ab_glyph_rasterizer" 17 + version = "0.1.10" 18 + source = "registry+https://github.com/rust-lang/crates.io-index" 19 + checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" 20 + 21 + [[package]] 6 22 name = "adler2" 7 23 version = "2.0.1" 8 24 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 31 47 version = "1.0.100" 32 48 source = "registry+https://github.com/rust-lang/crates.io-index" 33 49 checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" 50 + 51 + [[package]] 52 + name = "approx" 53 + version = "0.5.1" 54 + source = "registry+https://github.com/rust-lang/crates.io-index" 55 + checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" 56 + dependencies = [ 57 + "num-traits", 58 + ] 34 59 35 60 [[package]] 36 61 name = "arbitrary" ··· 324 349 checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 325 350 dependencies = [ 326 351 "cfg-if", 352 + "js-sys", 327 353 "libc", 328 354 "r-efi", 329 355 "wasip2", 356 + "wasm-bindgen", 330 357 ] 331 358 332 359 [[package]] ··· 340 367 ] 341 368 342 369 [[package]] 370 + name = "glam" 371 + version = "0.14.0" 372 + source = "registry+https://github.com/rust-lang/crates.io-index" 373 + checksum = "333928d5eb103c5d4050533cec0384302db6be8ef7d3cebd30ec6a35350353da" 374 + 375 + [[package]] 376 + name = "glam" 377 + version = "0.15.2" 378 + source = "registry+https://github.com/rust-lang/crates.io-index" 379 + checksum = "3abb554f8ee44336b72d522e0a7fe86a29e09f839a36022fa869a7dfe941a54b" 380 + 381 + [[package]] 382 + name = "glam" 383 + version = "0.16.0" 384 + source = "registry+https://github.com/rust-lang/crates.io-index" 385 + checksum = "4126c0479ccf7e8664c36a2d719f5f2c140fbb4f9090008098d2c291fa5b3f16" 386 + 387 + [[package]] 388 + name = "glam" 389 + version = "0.17.3" 390 + source = "registry+https://github.com/rust-lang/crates.io-index" 391 + checksum = "e01732b97afd8508eee3333a541b9f7610f454bb818669e66e90f5f57c93a776" 392 + 393 + [[package]] 394 + name = "glam" 395 + version = "0.18.0" 396 + source = "registry+https://github.com/rust-lang/crates.io-index" 397 + checksum = "525a3e490ba77b8e326fb67d4b44b4bd2f920f44d4cc73ccec50adc68e3bee34" 398 + 399 + [[package]] 400 + name = "glam" 401 + version = "0.19.0" 402 + source = "registry+https://github.com/rust-lang/crates.io-index" 403 + checksum = "2b8509e6791516e81c1a630d0bd7fbac36d2fa8712a9da8662e716b52d5051ca" 404 + 405 + [[package]] 406 + name = "glam" 407 + version = "0.20.5" 408 + source = "registry+https://github.com/rust-lang/crates.io-index" 409 + checksum = "f43e957e744be03f5801a55472f593d43fabdebf25a4585db250f04d86b1675f" 410 + 411 + [[package]] 412 + name = "glam" 413 + version = "0.21.3" 414 + source = "registry+https://github.com/rust-lang/crates.io-index" 415 + checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" 416 + 417 + [[package]] 418 + name = "glam" 419 + version = "0.22.0" 420 + source = "registry+https://github.com/rust-lang/crates.io-index" 421 + checksum = "12f597d56c1bd55a811a1be189459e8fad2bbc272616375602443bdfb37fa774" 422 + 423 + [[package]] 424 + name = "glam" 425 + version = "0.23.0" 426 + source = "registry+https://github.com/rust-lang/crates.io-index" 427 + checksum = "8e4afd9ad95555081e109fe1d21f2a30c691b5f0919c67dfa690a2e1eb6bd51c" 428 + 429 + [[package]] 430 + name = "glam" 431 + version = "0.24.2" 432 + source = "registry+https://github.com/rust-lang/crates.io-index" 433 + checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" 434 + 435 + [[package]] 436 + name = "glam" 437 + version = "0.25.0" 438 + source = "registry+https://github.com/rust-lang/crates.io-index" 439 + checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" 440 + 441 + [[package]] 442 + name = "glam" 443 + version = "0.27.0" 444 + source = "registry+https://github.com/rust-lang/crates.io-index" 445 + checksum = "9e05e7e6723e3455f4818c7b26e855439f7546cf617ef669d1adedb8669e5cb9" 446 + 447 + [[package]] 448 + name = "glam" 449 + version = "0.28.0" 450 + source = "registry+https://github.com/rust-lang/crates.io-index" 451 + checksum = "779ae4bf7e8421cf91c0b3b64e7e8b40b862fba4d393f59150042de7c4965a94" 452 + 453 + [[package]] 454 + name = "glam" 455 + version = "0.29.3" 456 + source = "registry+https://github.com/rust-lang/crates.io-index" 457 + checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee" 458 + 459 + [[package]] 460 + name = "glam" 461 + version = "0.30.10" 462 + source = "registry+https://github.com/rust-lang/crates.io-index" 463 + checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9" 464 + 465 + [[package]] 343 466 name = "half" 344 467 version = "2.7.1" 345 468 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 385 508 ] 386 509 387 510 [[package]] 511 + name = "imageproc" 512 + version = "0.26.0" 513 + source = "registry+https://github.com/rust-lang/crates.io-index" 514 + checksum = "3880a67ffee492100224b2ff31f4220ade971fc327c3c96faa63095a3825ea4d" 515 + dependencies = [ 516 + "ab_glyph", 517 + "approx", 518 + "getrandom", 519 + "image", 520 + "itertools", 521 + "nalgebra", 522 + "num", 523 + "rand", 524 + "rand_distr", 525 + "rayon", 526 + "rustdct", 527 + ] 528 + 529 + [[package]] 388 530 name = "imgref" 389 531 version = "1.12.0" 390 532 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 421 563 ] 422 564 423 565 [[package]] 566 + name = "js-sys" 567 + version = "0.3.83" 568 + source = "registry+https://github.com/rust-lang/crates.io-index" 569 + checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" 570 + dependencies = [ 571 + "once_cell", 572 + "wasm-bindgen", 573 + ] 574 + 575 + [[package]] 424 576 name = "lebe" 425 577 version = "0.5.3" 426 578 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 443 595 ] 444 596 445 597 [[package]] 598 + name = "libm" 599 + version = "0.2.15" 600 + source = "registry+https://github.com/rust-lang/crates.io-index" 601 + checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" 602 + 603 + [[package]] 446 604 name = "log" 447 605 version = "0.4.29" 448 606 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 455 613 checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" 456 614 dependencies = [ 457 615 "imgref", 616 + ] 617 + 618 + [[package]] 619 + name = "matrixmultiply" 620 + version = "0.3.10" 621 + source = "registry+https://github.com/rust-lang/crates.io-index" 622 + checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08" 623 + dependencies = [ 624 + "autocfg", 625 + "rawpointer", 458 626 ] 459 627 460 628 [[package]] ··· 494 662 ] 495 663 496 664 [[package]] 665 + name = "nalgebra" 666 + version = "0.34.1" 667 + source = "registry+https://github.com/rust-lang/crates.io-index" 668 + checksum = "c4d5b3eff5cd580f93da45e64715e8c20a3996342f1e466599cf7a267a0c2f5f" 669 + dependencies = [ 670 + "approx", 671 + "glam 0.14.0", 672 + "glam 0.15.2", 673 + "glam 0.16.0", 674 + "glam 0.17.3", 675 + "glam 0.18.0", 676 + "glam 0.19.0", 677 + "glam 0.20.5", 678 + "glam 0.21.3", 679 + "glam 0.22.0", 680 + "glam 0.23.0", 681 + "glam 0.24.2", 682 + "glam 0.25.0", 683 + "glam 0.27.0", 684 + "glam 0.28.0", 685 + "glam 0.29.3", 686 + "glam 0.30.10", 687 + "matrixmultiply", 688 + "num-complex", 689 + "num-rational", 690 + "num-traits", 691 + "simba", 692 + "typenum", 693 + ] 694 + 695 + [[package]] 497 696 name = "new_debug_unreachable" 498 697 version = "1.0.6" 499 698 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 515 714 checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" 516 715 517 716 [[package]] 717 + name = "num" 718 + version = "0.4.3" 719 + source = "registry+https://github.com/rust-lang/crates.io-index" 720 + checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" 721 + dependencies = [ 722 + "num-complex", 723 + "num-integer", 724 + "num-iter", 725 + "num-rational", 726 + "num-traits", 727 + ] 728 + 729 + [[package]] 518 730 name = "num-bigint" 519 731 version = "0.4.6" 520 732 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 525 737 ] 526 738 527 739 [[package]] 740 + name = "num-complex" 741 + version = "0.4.6" 742 + source = "registry+https://github.com/rust-lang/crates.io-index" 743 + checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 744 + dependencies = [ 745 + "num-traits", 746 + ] 747 + 748 + [[package]] 528 749 name = "num-derive" 529 750 version = "0.4.2" 530 751 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 545 766 ] 546 767 547 768 [[package]] 769 + name = "num-iter" 770 + version = "0.1.45" 771 + source = "registry+https://github.com/rust-lang/crates.io-index" 772 + checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 773 + dependencies = [ 774 + "autocfg", 775 + "num-integer", 776 + "num-traits", 777 + ] 778 + 779 + [[package]] 548 780 name = "num-rational" 549 781 version = "0.4.2" 550 782 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 562 794 checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 563 795 dependencies = [ 564 796 "autocfg", 797 + "libm", 565 798 ] 566 799 567 800 [[package]] ··· 569 802 version = "1.21.3" 570 803 source = "registry+https://github.com/rust-lang/crates.io-index" 571 804 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 805 + 806 + [[package]] 807 + name = "owned_ttf_parser" 808 + version = "0.25.1" 809 + source = "registry+https://github.com/rust-lang/crates.io-index" 810 + checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" 811 + dependencies = [ 812 + "ttf-parser", 813 + ] 572 814 573 815 [[package]] 574 816 name = "paste" ··· 605 847 ] 606 848 607 849 [[package]] 850 + name = "primal-check" 851 + version = "0.3.4" 852 + source = "registry+https://github.com/rust-lang/crates.io-index" 853 + checksum = "dc0d895b311e3af9902528fbb8f928688abbd95872819320517cc24ca6b2bd08" 854 + dependencies = [ 855 + "num-integer", 856 + ] 857 + 858 + [[package]] 608 859 name = "proc-macro2" 609 860 version = "1.0.105" 610 861 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 701 952 ] 702 953 703 954 [[package]] 955 + name = "rand_distr" 956 + version = "0.5.1" 957 + source = "registry+https://github.com/rust-lang/crates.io-index" 958 + checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" 959 + dependencies = [ 960 + "num-traits", 961 + "rand", 962 + ] 963 + 964 + [[package]] 704 965 name = "rav1e" 705 966 version = "0.8.1" 706 967 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 751 1012 ] 752 1013 753 1014 [[package]] 1015 + name = "rawpointer" 1016 + version = "0.2.1" 1017 + source = "registry+https://github.com/rust-lang/crates.io-index" 1018 + checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" 1019 + 1020 + [[package]] 754 1021 name = "rayon" 755 1022 version = "1.11.0" 756 1023 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 777 1044 checksum = "0c6a884d2998352bb4daf0183589aec883f16a6da1f4dde84d8e2e9a5409a1ce" 778 1045 779 1046 [[package]] 1047 + name = "rustdct" 1048 + version = "0.7.1" 1049 + source = "registry+https://github.com/rust-lang/crates.io-index" 1050 + checksum = "8b61555105d6a9bf98797c063c362a1d24ed8ab0431655e38f1cf51e52089551" 1051 + dependencies = [ 1052 + "rustfft", 1053 + ] 1054 + 1055 + [[package]] 1056 + name = "rustfft" 1057 + version = "6.4.1" 1058 + source = "registry+https://github.com/rust-lang/crates.io-index" 1059 + checksum = "21db5f9893e91f41798c88680037dba611ca6674703c1a18601b01a72c8adb89" 1060 + dependencies = [ 1061 + "num-complex", 1062 + "num-integer", 1063 + "num-traits", 1064 + "primal-check", 1065 + "strength_reduce", 1066 + "transpose", 1067 + ] 1068 + 1069 + [[package]] 780 1070 name = "rustversion" 781 1071 version = "1.0.22" 782 1072 source = "registry+https://github.com/rust-lang/crates.io-index" 783 1073 checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 784 1074 785 1075 [[package]] 1076 + name = "safe_arch" 1077 + version = "0.7.4" 1078 + source = "registry+https://github.com/rust-lang/crates.io-index" 1079 + checksum = "96b02de82ddbe1b636e6170c21be622223aea188ef2e139be0a5b219ec215323" 1080 + dependencies = [ 1081 + "bytemuck", 1082 + ] 1083 + 1084 + [[package]] 786 1085 name = "shlex" 787 1086 version = "1.3.0" 788 1087 source = "registry+https://github.com/rust-lang/crates.io-index" 789 1088 checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 790 1089 791 1090 [[package]] 1091 + name = "simba" 1092 + version = "0.9.1" 1093 + source = "registry+https://github.com/rust-lang/crates.io-index" 1094 + checksum = "c99284beb21666094ba2b75bbceda012e610f5479dfcc2d6e2426f53197ffd95" 1095 + dependencies = [ 1096 + "approx", 1097 + "num-complex", 1098 + "num-traits", 1099 + "paste", 1100 + "wide", 1101 + ] 1102 + 1103 + [[package]] 792 1104 name = "simd-adler32" 793 1105 version = "0.3.8" 794 1106 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 814 1126 version = "1.2.1" 815 1127 source = "registry+https://github.com/rust-lang/crates.io-index" 816 1128 checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" 1129 + 1130 + [[package]] 1131 + name = "strength_reduce" 1132 + version = "0.2.4" 1133 + source = "registry+https://github.com/rust-lang/crates.io-index" 1134 + checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" 817 1135 818 1136 [[package]] 819 1137 name = "syn" ··· 861 1179 ] 862 1180 863 1181 [[package]] 1182 + name = "transpose" 1183 + version = "0.2.3" 1184 + source = "registry+https://github.com/rust-lang/crates.io-index" 1185 + checksum = "1ad61aed86bc3faea4300c7aee358b4c6d0c8d6ccc36524c96e4c92ccf26e77e" 1186 + dependencies = [ 1187 + "num-integer", 1188 + "strength_reduce", 1189 + ] 1190 + 1191 + [[package]] 1192 + name = "ttf-parser" 1193 + version = "0.25.1" 1194 + source = "registry+https://github.com/rust-lang/crates.io-index" 1195 + checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" 1196 + 1197 + [[package]] 1198 + name = "typenum" 1199 + version = "1.19.0" 1200 + source = "registry+https://github.com/rust-lang/crates.io-index" 1201 + checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" 1202 + 1203 + [[package]] 864 1204 name = "unicode-ident" 865 1205 version = "1.0.22" 866 1206 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 882 1222 version = "0.1.0" 883 1223 dependencies = [ 884 1224 "image", 1225 + "imageproc", 885 1226 ] 886 1227 887 1228 [[package]] ··· 943 1284 version = "0.1.12" 944 1285 source = "registry+https://github.com/rust-lang/crates.io-index" 945 1286 checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" 1287 + 1288 + [[package]] 1289 + name = "wide" 1290 + version = "0.7.33" 1291 + source = "registry+https://github.com/rust-lang/crates.io-index" 1292 + checksum = "0ce5da8ecb62bcd8ec8b7ea19f69a51275e91299be594ea5cc6ef7819e16cd03" 1293 + dependencies = [ 1294 + "bytemuck", 1295 + "safe_arch", 1296 + ] 946 1297 947 1298 [[package]] 948 1299 name = "wit-bindgen"
+1
Cargo.toml
··· 8 8 9 9 [dependencies] 10 10 image = "0.25.9" 11 + imageproc = "0.26.0"
+17
src/main.rs
··· 1 1 use image::open; 2 + use imageproc::geometric_transformations::{Interpolation, rotate}; 2 3 use std::{env, process}; 3 4 4 5 fn print_usage(executable: &str) { ··· 29 30 let input_path = input; 30 31 let image = open(&input_path).unwrap_or_else(|e| { 31 32 eprintln!("failed to open '{}': {}", input_path.to_string(), e); 33 + process::exit(1); 34 + }); 35 + 36 + let width = image.width(); 37 + let height = image.height(); 38 + 39 + let rotated = rotate( 40 + &image.to_rgba8(), 41 + (width as f32 / 2.0, height as f32 / 2.0), 42 + (45.0 as f32).to_radians(), 43 + Interpolation::Bilinear, 44 + image::Rgba([0, 0, 0, 0]), 45 + ); 46 + 47 + rotated.save(&output).unwrap_or_else(|e| { 48 + eprintln!("failed to save '{}': {}", output.to_string(), e); 32 49 process::exit(1); 33 50 }); 34 51 }