From ae6e67f31593f8986b303ce351d209a08113fa16 Mon Sep 17 00:00:00 2001 From: Andrew Haynes Date: Thu, 16 Jul 2026 04:31:56 -0400 Subject: [PATCH] Added images but also am trying to fix formatting --- .DS_Store | Bin 0 -> 8196 bytes .clang-format | 19 +++ .clang-tidy | 22 +++ .flox/.DS_Store | Bin 0 -> 6148 bytes .flox/.gitattributes | 1 + .flox/.gitignore | 5 + .flox/env.json | 4 + .flox/env/manifest.lock | 295 ++++++++++++++++++++++++++++++++++++++++ .flox/env/manifest.toml | 97 +++++++++++++ .gitignore | 2 + CMakeLists.txt | 20 +++ MF8jno_2.ppm | 3 + src/.DS_Store | Bin 0 -> 6148 bytes src/main.c | 64 +++++++++ 14 files changed, 532 insertions(+) create mode 100644 .DS_Store create mode 100644 .clang-format create mode 100644 .clang-tidy create mode 100644 .flox/.DS_Store create mode 100644 .flox/.gitattributes create mode 100644 .flox/.gitignore create mode 100644 .flox/env.json create mode 100644 .flox/env/manifest.lock create mode 100644 .flox/env/manifest.toml create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 MF8jno_2.ppm create mode 100644 src/.DS_Store create mode 100644 src/main.c diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..15ef6c59206cc7fb11d8dbeb5dd300c7a53fdf9a GIT binary patch literal 8196 zcmeHMO>7%Q6n+yY&6+fHd$DKwl@05bq!U}e&rz-B;UdRF_&h#YwaB|$vEHn@KElvSa%dY`o(& zGy|Fe&46a$abN(?Y*vgR=f2SDRx_X(_+K)>_J<5sCi7CZgydTXHv9^JaukPo!9Lyt zI3^=yUdon`9EzVQZVyC4iM(PE0Y`m?nWM~0*%DH~fe1Jd>6yqI3gO-nm*M6>@_^{Wi|O+SIqz_XIp^ z$1sj9@PWd$p0^03aS%NyS~Z5xCoe94c>5O?Lytu_g25I&{>dGL<4$xEs^CG~;~l>G zS=Fh&kEd4JzB||&?Rp-h@Adl`^E(D*XrNyoobql|m+XF5uKQjT=W@T3k;LfOfpKHp zm@qC`+jQ58?YI#Y>~MoUtx)Qh+kLyd>bbimbNU<&V%rPckOMr&MU%~oUf|H(0&N6N z#Icr87)c{pGH062GxKw^nKQY$z1d82{&a3ObN0ovdwWSEoqgfe<*pKTNYdr{oh82PdCAWKN|HPfbsy)9KWanWs}nkCn{B zWxH~<8nRf=QJ;ndzu}h5LlMsSLWKrPp}T`KU5njovE{vus?vkC0LDel>zvSCx*Ix_@G>&O)&BIx+$hk|aZdbgZntkn_ATpWFKPP%7WZT>( zr`tU#N%luabXNkq<|1fGJZAIfTcT&c30MFNHsLL3!6$G7zJ{OR7W@f+!F@7Go+8hZ z6J(amk(WrGERbcgL9P&+yeZ%#?PX>gg;Gd_56UvDDPyjFf45hwCe0T&U%&BXf^QlM zUQL_97HZ;{8+TYN3Vz251D^&}9Ay!YV>$)6q4}6t&cK(F`z+K5KYpck`REUPOX;)f zCiieFHBuHPmIOo)LPbgMZ`;Z6pQZPaX7lCKnBMdMl-=)%c!y>;%YHc-b;$vav0J3n zsAQ&Zee|hZ?vA!gV!yVRyc`Qh;`S{u)9CUr3?u}2hOONB;qU(+#)Zae1~dbYIRj+0 zXcY?>Wc#e&A1}LWXRuzu$_le<3CSVY@as5AejP{I`NI(V88l^>yp$~=aRkewdJ)if nvKKp7mf`eg5N*AeBUY{`0TLBWNA~Q79jP literal 0 HcmV?d00001 diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..369e701 --- /dev/null +++ b/.clang-format @@ -0,0 +1,19 @@ +--- +BasedOnStyle: Google +Standard: Latest +UseTab: Always +TabWidth: 8 +IndentWidth: 8 +BreakBeforeBraces: Allman +SpaceBeforeCpp11BracedList: true +SeparateDefinitionBlocks: Always +Cpp11BracedListStyle: false +BreakAfterReturnType: TopLevel +AlignTrailingComments: + Kind: Always +ReflowComments: Always +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: AllIfsAndElse +AllowShortLoopsOnASingleLine: true +IndentAccessModifiers: false # Indent access specifiers by one level +AccessModifierOffset: -4 # Optional: adjust offset relative to the class indentation level diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..0b0f492 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,22 @@ +--- +Checks: > + -*, + bugprone-*, + concurrency-*, + misc-*, + modernize-*, + performance-*, + readability-*, + portability-*, + -readability-braces-around-statements, + -readability-implicit-bool-conversion + +WarningsAsErrors: "" + +CheckOptions: + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.FunctionCase + value: lower_case +--- + \ No newline at end of file diff --git a/.flox/.DS_Store b/.flox/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4d05dc56600c9ff268da500b529e302f666be4a7 GIT binary patch literal 6148 zcmeHKOG*Pl5Uoz4L`29^1fjiw0T(XEFrFYTU1&Z`7D*-uaVY~XL{}cboyYJ1-oUjN z@D9G}Dl*fKlAVZDLG|mY&pi6gFg;B~uD2X@i8@5ohBG#{FnnX2XRld9Bi!u5J;u|l z+aKn$MXlBXe^UW|b{jOLOZbH1=jS$`;_NI>)4?I4im~Ve4@P$m3@BI1we#NKR zlCPeP`3{Beik38w`RFF_g-n(2@hvOYr`eLPo{jmK&dd}r1x$gp3SiG>Yi|qMXbPAD zroc)8{yum(W1?6HhEE5Ea0CFh5Dtbp|59>~S4=qk_gW9XfU|L3A-HP6By7c~<*j%Z9t?5M6JVlP2qFTrAAul)4W_`aD)0%mqj--1 literal 0 HcmV?d00001 diff --git a/.flox/.gitattributes b/.flox/.gitattributes new file mode 100644 index 0000000..bb5491e --- /dev/null +++ b/.flox/.gitattributes @@ -0,0 +1 @@ +env/manifest.lock linguist-generated=true linguist-language=JSON diff --git a/.flox/.gitignore b/.flox/.gitignore new file mode 100644 index 0000000..8d21186 --- /dev/null +++ b/.flox/.gitignore @@ -0,0 +1,5 @@ +run/ +cache/ +lib/ +log/ +!env/ diff --git a/.flox/env.json b/.flox/env.json new file mode 100644 index 0000000..5e331b8 --- /dev/null +++ b/.flox/env.json @@ -0,0 +1,4 @@ +{ + "name": "image-rasterizer", + "version": 1 +} diff --git a/.flox/env/manifest.lock b/.flox/env/manifest.lock new file mode 100644 index 0000000..4414c95 --- /dev/null +++ b/.flox/env/manifest.lock @@ -0,0 +1,295 @@ +{ + "lockfile-version": 1, + "manifest": { + "schema-version": "1.11.0", + "install": { + "libjpeg_turbo": { + "pkg-path": "libjpeg_turbo" + }, + "pkgconfig": { + "pkg-path": "pkgconfig" + } + }, + "hook": {}, + "profile": {}, + "options": {} + }, + "packages": [ + { + "attr_path": "libjpeg_turbo", + "broken": false, + "derivation": "/nix/store/1a0iqp8da6npyr03r1dp0pidz2zwgv2w-libjpeg-turbo-2.1.5.1.drv", + "description": "A faster (using SIMD) libjpeg implementation", + "install_id": "libjpeg_turbo", + "license": "IJG", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "libjpeg-turbo-2.1.5.1", + "pname": "libjpeg_turbo", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "2.1.5.1", + "outputs_to_install": [ + "bin", + "man" + ], + "outputs": { + "bin": "/nix/store/nmd4d67xa8spln907xqvns5ybgwff27n-libjpeg-turbo-2.1.5.1-bin", + "dev": "/nix/store/afiz0d5hgh7nmfk1r79k56jglv1q5rd2-libjpeg-turbo-2.1.5.1-dev", + "dev_private": "/nix/store/sw29da9xn27nz9v5zw61dwka94h1al4p-libjpeg-turbo-2.1.5.1-dev_private", + "doc": "/nix/store/sq7dagbd30jgy1wcsakx253wx49wzx75-libjpeg-turbo-2.1.5.1-doc", + "man": "/nix/store/g3zq3w28l8a5fqshp1azhyivgrzbhllf-libjpeg-turbo-2.1.5.1-man", + "out": "/nix/store/v13fyls4qpvzs72rx4pni1rppih49hcv-libjpeg-turbo-2.1.5.1" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "libjpeg_turbo", + "broken": false, + "derivation": "/nix/store/p04rfk8fc73vcppib57yy0xkiqgfsy5y-libjpeg-turbo-2.1.5.1.drv", + "description": "A faster (using SIMD) libjpeg implementation", + "install_id": "libjpeg_turbo", + "license": "IJG", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "libjpeg-turbo-2.1.5.1", + "pname": "libjpeg_turbo", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "2.1.5.1", + "outputs_to_install": [ + "bin", + "man" + ], + "outputs": { + "bin": "/nix/store/bgdl3nl2r5x4nkfdf24nc02wrbw4nnaq-libjpeg-turbo-2.1.5.1-bin", + "dev": "/nix/store/9k3pba6barhf92lw68z0xswj5wms17lp-libjpeg-turbo-2.1.5.1-dev", + "dev_private": "/nix/store/ibifdmpilixc0hyhrrgy7p2zxnc73868-libjpeg-turbo-2.1.5.1-dev_private", + "doc": "/nix/store/0rz09f9r42apk17rxsimfzkp70vwdxwh-libjpeg-turbo-2.1.5.1-doc", + "man": "/nix/store/x7kiw576znfbjqf0lxzf7l0bjvz98mm8-libjpeg-turbo-2.1.5.1-man", + "out": "/nix/store/rp03nw4yizsssylgwh7q1n8jkrfrrmsb-libjpeg-turbo-2.1.5.1" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "libjpeg_turbo", + "broken": false, + "derivation": "/nix/store/bz1q3yza7bvcfppf9djflvcawbsqfjab-libjpeg-turbo-2.1.5.1.drv", + "description": "A faster (using SIMD) libjpeg implementation", + "install_id": "libjpeg_turbo", + "license": "IJG", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "libjpeg-turbo-2.1.5.1", + "pname": "libjpeg_turbo", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "2.1.5.1", + "outputs_to_install": [ + "bin", + "man" + ], + "outputs": { + "bin": "/nix/store/7kmsflizc3ri9r7gsmp13yfk4kf9qqsg-libjpeg-turbo-2.1.5.1-bin", + "dev": "/nix/store/2a757j7zhigxl1l1sj0glpj9a8ra5s45-libjpeg-turbo-2.1.5.1-dev", + "dev_private": "/nix/store/9q1ihhgi8xai9m2w7lymz9zsw3z6hczm-libjpeg-turbo-2.1.5.1-dev_private", + "doc": "/nix/store/if8q5149y1dwsadzzf8qzfrlq8b8bmvl-libjpeg-turbo-2.1.5.1-doc", + "man": "/nix/store/sv66q13hz21wb432hzcb1rpjwkhqqdif-libjpeg-turbo-2.1.5.1-man", + "out": "/nix/store/z8704g4qyynq99y02dqcd2jjv3ns2bdr-libjpeg-turbo-2.1.5.1" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "libjpeg_turbo", + "broken": false, + "derivation": "/nix/store/aygqwc3jb2jkldvf7wi34qm5fyj2x2x6-libjpeg-turbo-2.1.5.1.drv", + "description": "A faster (using SIMD) libjpeg implementation", + "install_id": "libjpeg_turbo", + "license": "IJG", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "libjpeg-turbo-2.1.5.1", + "pname": "libjpeg_turbo", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "2.1.5.1", + "outputs_to_install": [ + "bin", + "man" + ], + "outputs": { + "bin": "/nix/store/53d1gx3hsf5aabq6spiqdxnq7646kr0y-libjpeg-turbo-2.1.5.1-bin", + "dev": "/nix/store/qf706fbqdgj2n7cwdbr0nyibf3h16if8-libjpeg-turbo-2.1.5.1-dev", + "dev_private": "/nix/store/rn7wkk5q17l9r3hh4ryj9rc79038q5k3-libjpeg-turbo-2.1.5.1-dev_private", + "doc": "/nix/store/2lcf4n0qx5aj3awvrjjs00mspnv0ghr2-libjpeg-turbo-2.1.5.1-doc", + "man": "/nix/store/1l5ialkzcihcalsa2zj6cynzdxh6ncr8-libjpeg-turbo-2.1.5.1-man", + "out": "/nix/store/dw932dvfv8vaa617g2kdg3hwnh5sr92y-libjpeg-turbo-2.1.5.1" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "pkgconfig", + "broken": false, + "derivation": "/nix/store/m9yga2pklxghq9m0813zj73igmd1sm4i-pkg-config-wrapper-0.29.2.drv", + "description": "A tool that allows packages to find out information about other packages (wrapper script)", + "install_id": "pkgconfig", + "license": "GPL-2.0-or-later", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "pkg-config-wrapper-0.29.2", + "pname": "pkgconfig", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "0.29.2", + "outputs_to_install": [ + "man", + "out" + ], + "outputs": { + "doc": "/nix/store/d6shg9fwdh603k1jwqh973p0k28z9g4l-pkg-config-wrapper-0.29.2-doc", + "man": "/nix/store/hxj0fki6h9d9fj4a9k0qy9vbqp3yka7p-pkg-config-wrapper-0.29.2-man", + "out": "/nix/store/av3xsi32qifl0xk20xsgnb87h5sgyvyb-pkg-config-wrapper-0.29.2" + }, + "system": "aarch64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "pkgconfig", + "broken": false, + "derivation": "/nix/store/clgr1z1kpbrm2n6xvghqj8n7i0ayr7zb-pkg-config-wrapper-0.29.2.drv", + "description": "A tool that allows packages to find out information about other packages (wrapper script)", + "install_id": "pkgconfig", + "license": "GPL-2.0-or-later", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "pkg-config-wrapper-0.29.2", + "pname": "pkgconfig", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "0.29.2", + "outputs_to_install": [ + "man", + "out" + ], + "outputs": { + "doc": "/nix/store/rcpz2rx24d380hs80djvqyj0d7yx4f6p-pkg-config-wrapper-0.29.2-doc", + "man": "/nix/store/26h6w8dpqh0ainmdsmy24dqmqf7n7lbr-pkg-config-wrapper-0.29.2-man", + "out": "/nix/store/sj2d8gsc4rq55hhdqs3m5fn3pbg5p4rb-pkg-config-wrapper-0.29.2" + }, + "system": "aarch64-linux", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "pkgconfig", + "broken": false, + "derivation": "/nix/store/gyjqnb26jx60bq4jz7d3d8k6s2pr2d7k-pkg-config-wrapper-0.29.2.drv", + "description": "A tool that allows packages to find out information about other packages (wrapper script)", + "install_id": "pkgconfig", + "license": "GPL-2.0-or-later", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "pkg-config-wrapper-0.29.2", + "pname": "pkgconfig", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "0.29.2", + "outputs_to_install": [ + "man", + "out" + ], + "outputs": { + "doc": "/nix/store/rv66cg2frg90y4w091nr16l4ijc84gyb-pkg-config-wrapper-0.29.2-doc", + "man": "/nix/store/yphb7y4yj6i1js0ahxryrbxsw7hh8rbk-pkg-config-wrapper-0.29.2-man", + "out": "/nix/store/3np6lyxwb7n5x2y31rb6nxfj6118ya2b-pkg-config-wrapper-0.29.2" + }, + "system": "x86_64-darwin", + "group": "toplevel", + "priority": 5 + }, + { + "attr_path": "pkgconfig", + "broken": false, + "derivation": "/nix/store/6ycm6d80nkw8yjkxjnzm5741lzgqhyyq-pkg-config-wrapper-0.29.2.drv", + "description": "A tool that allows packages to find out information about other packages (wrapper script)", + "install_id": "pkgconfig", + "license": "GPL-2.0-or-later", + "locked_url": "https://github.com/flox/nixpkgs?rev=3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "name": "pkg-config-wrapper-0.29.2", + "pname": "pkgconfig", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "rev_count": 524605, + "rev_date": "2023-09-11T08:56:06Z", + "scrape_date": "2024-08-16T00:12:06Z", + "stabilities": [ + "unstable", + "staging" + ], + "unfree": false, + "version": "0.29.2", + "outputs_to_install": [ + "man", + "out" + ], + "outputs": { + "doc": "/nix/store/ww3vgwch8xr6bnq27plkbajlyifjmk2m-pkg-config-wrapper-0.29.2-doc", + "man": "/nix/store/h6fp99akihksg5zx8p0lrmfalpbvm0dr-pkg-config-wrapper-0.29.2-man", + "out": "/nix/store/6gvzma127ffp5x7mg4fmf0snbm15cciz-pkg-config-wrapper-0.29.2" + }, + "system": "x86_64-linux", + "group": "toplevel", + "priority": 5 + } + ] +} diff --git a/.flox/env/manifest.toml b/.flox/env/manifest.toml new file mode 100644 index 0000000..19c8804 --- /dev/null +++ b/.flox/env/manifest.toml @@ -0,0 +1,97 @@ +schema-version = "1.11.0" + + +## Install Packages -------------------------------------------------- +## $ flox install gum <- puts a package in [install] section below +## $ flox search gum <- search for a package +## $ flox show gum <- show all versions of a package +## ------------------------------------------------------------------- +[install] +pkgconfig.pkg-path = "pkgconfig" +libjpeg_turbo.pkg-path = "libjpeg_turbo" +# gum.pkg-path = "gum" +# gum.version = "^0.14.5" + + +## Environment Variables --------------------------------------------- +## ... available for use in the activated environment +## as well as [hook], [profile] scripts and [services] below. +## ------------------------------------------------------------------- +[vars] +# INTRO_MESSAGE = "It's gettin' Flox in here" + + +## Activation Hook --------------------------------------------------- +## ... run by _bash_ shell when you run 'flox activate'. +## ------------------------------------------------------------------- +[hook] +# on-activate = ''' +# # -> Set variables, create files and directories +# # -> Perform initialization steps, e.g. create a python venv +# # -> Useful environment variables: +# # - FLOX_ENV_PROJECT=/home/user/example +# # - FLOX_ENV=/home/user/example/.flox/run +# # - FLOX_ENV_CACHE=/home/user/example/.flox/cache +# ''' + + +## Profile script ---------------------------------------------------- +## ... sourced by _your shell_ when you run 'flox activate'. +## ------------------------------------------------------------------- +[profile] +# common = ''' +# gum style \ +# --foreground 212 --border-foreground 212 --border double \ +# --align center --width 50 --margin "1 2" --padding "2 4" \ +# $INTRO_MESSAGE +# ''' +## Shell-specific customizations such as setting aliases go here: +# bash = ... +# zsh = ... +# fish = ... + + +## Services --------------------------------------------------------- +## $ flox services start <- Starts all services +## $ flox services status <- Status of running services +## $ flox activate --start-services <- Activates & starts all +## ------------------------------------------------------------------ +[services] +# myservice.command = "python3 -m http.server" + + +## Include ---------------------------------------------------------- +## ... environments to create a composed environment +## ------------------------------------------------------------------ +[include] +# environments = [ +# { dir = "../common" } +# ] + + +## Build and publish your own packages ------------------------------ +## $ flox build +## $ flox publish +## ------------------------------------------------------------------ +[build] +# [build.myproject] +# description = "The coolest project ever" +# version = "0.0.1" +# command = """ +# mkdir -p $out/bin +# cargo build --release +# cp target/release/myproject $out/bin/myproject +# """ + + +## Other Environment Options ----------------------------------------- +[options] +# Systems that environment is compatible with +# systems = [ +# "aarch64-darwin", +# "aarch64-linux", +# "x86_64-darwin", +# "x86_64-linux", +# ] +# Uncomment to disable CUDA detection. +# cuda-detection = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b79a54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/ +.cache/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d8bf6c1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 4.2.1) +set(CMAKE_C_STANDARD 23) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +include_directories(include) +project(image_rasterizer LANGUAGES C) + +set(SOURCES + src/main.c +) + +include(FetchContent) +FetchContent_Declare(PROCESSOR + GIT_REPOSITORY git@moo:dmm/image_processor.git + GIT_TAG main) +FetchContent_MakeAvailable(PROCESSOR) + +add_executable(image_rasterizer ${SOURCES}) +target_link_libraries(image_rasterizer PRIVATE PROCESSOR) + diff --git a/MF8jno_2.ppm b/MF8jno_2.ppm new file mode 100644 index 0000000..1828683 --- /dev/null +++ b/MF8jno_2.ppm @@ -0,0 +1,3 @@ +P6 +0 0 +255 diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 +#include + +#include "image/filters.h" +#include "image/imgio.h" +#include "image/transformations.h" +#include "image/utils.h" + +int +main() +{ + JPEG out_1 = { + .name = "../test.jpg", + + }; + + PPM out_2 = { + .name = "../MF8jno.ppm", + .fmt = '6', + + }; + + PPM out_3 = { + .name = "../test.ppm", + .fmt = '6', + }; + transcode_to_ppm(&out_1, &out_3); + unsigned int* src = ppm_load(out_3.name, &out_3); + // out_3 = inherit_from_jpeg(&out_1, '6'); + // print_attr(&out_3); + for (int i = 0; i < out_3.len; i++) + { + src[i] = u32_grayscale(src[i]); + } + // src = u32_grayscale() + // src = u32_rotate(src, &out_3, out_1.le); + ppm_save(src, out_3); + // jpeg_save(src, &out_1, "../test-formatted.jpg"); + free(src); + + // unsigned int* ppm = ppm_load(out_2.name, &out_2); + // print_attr(&out_2); + // ppm = box_blur(ppm, &out_2, 100); + // ppm_save(ppm, out_2); + // free(ppm); + + // + // + // unsigned int* src = jpeg_load(&out_1); + // out_2 = inherit_from_jpeg(&out_1, '6'); + // src = box_blur(b, const PPM *img, const int radius) + // // inherit_from_jpeg(src, '6'); + // transcode_to_ppm(&out_1, &out_2); + // unsigned int* src = ppm_load(out_2.name, &out_2); + // src = box_blur(src, &out_2, 5); + // ppm_save(src, out_3); + // unsigned int* src_buf = ppm_load("../assets/8ktest.ppm", &out_2); + // unsigned int* blurred = box_blur(src_buf, &out_2, 10); + // unsigned int* flip = u32_rotate(src_buf_jpeg, ); + // ppm_save(blurred, out_2); + // free(src_buf); + // free(blurred); + return 0; +}