mirror of
https://github.com/spacebarchat/server.git
synced 2026-11-02 07:03:13 +00:00
Some build fixes after dep bumps
This commit is contained in:
1 parent
8e146241ef
commit
f566520486
7 files changed
+11
-11
No files matched your search
+5
-4
@@ -2,7 +2,8 @@
|
||||
*.sh -crlf
|
||||
*.nix -crlf
|
||||
.husky/pre-commit -crlf
|
||||
package-lock.json -diff
|
||||
flake.lock -diff
|
||||
assets/schemas.json -diff
|
||||
assets/openapi.json -diff
|
||||
package-lock.json -diff linguist-generated
|
||||
flake.lock -diff linguist-generated
|
||||
assets/schemas.json -diff linguist-generated
|
||||
assets/openapi.json -diff linguist-generated
|
||||
.idea/ linguist-generated
|
||||
+1
-1
@@ -72,7 +72,7 @@ let
|
||||
npm prune --omit dev --no-save --offline
|
||||
rm -v dist/src.tsbuildinfo
|
||||
rm -rv scripts
|
||||
time ${./nix/trimNodeModules.sh}
|
||||
# time ${./nix/trimNodeModules.sh}
|
||||
|
||||
# Copy outputs
|
||||
echo "Installing package into $out"
|
||||
|
||||
@@ -3,7 +3,7 @@ using ImageMagick;
|
||||
namespace Spacebar.AdminApi.TestClient.Services.Services;
|
||||
|
||||
public class PixelArtDetectionService {
|
||||
public bool IsPixelArt<T>(IMagickImage<T> img) where T : struct, IConvertible {
|
||||
public bool IsPixelArt<T>(IMagickImage<T> img) where T : unmanaged {
|
||||
// Simple heuristic: if the image has a limited color palette and sharp edges, consider it pixel art
|
||||
var colorCount = img.Histogram().Count;
|
||||
var edgeThreshold = 20; // Arbitrary threshold for edge detection
|
||||
@@ -19,7 +19,7 @@ public class PixelArtDetectionService {
|
||||
return isPixelArt;
|
||||
}
|
||||
|
||||
public bool IsCartoonArt<T>(IMagickImage<T> img) where T : struct, IConvertible {
|
||||
public bool IsCartoonArt<T>(IMagickImage<T> img) where T : unmanaged {
|
||||
// Simple heuristic: if the image has a limited color palette and smooth edges, consider it cartoon art
|
||||
var colorCount = img.Histogram().Count;
|
||||
var edgeThreshold = 5; // Lower threshold for smoother edges
|
||||
@@ -33,7 +33,7 @@ public class PixelArtDetectionService {
|
||||
return isCartoonArt;
|
||||
}
|
||||
|
||||
public IMagickImage<T> RenderEdges<T>(IMagickImage<T> img, double radius = 1) where T : struct, IConvertible {
|
||||
public IMagickImage<T> RenderEdges<T>(IMagickImage<T> img, double radius = 1) where T : unmanaged {
|
||||
var edgeImg = img.Clone();
|
||||
// edgeImg.Edge(radius);
|
||||
edgeImg.WaveletDenoise(new Percentage(50));
|
||||
|
||||
Generated
BIN
Binary file not shown.
+1
-2
@@ -45,7 +45,6 @@
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
systemd.emergencyAccess = true;
|
||||
};
|
||||
kernelParams = [
|
||||
@@ -77,4 +76,4 @@
|
||||
switch.enable = false;
|
||||
etc.overlay.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ echo "Removing CLI scripts..."
|
||||
for f in ./node_modules/.bin/*; do
|
||||
rm -f "$(realpath $f)" $f
|
||||
done
|
||||
find ./node_modules -type d -name '.bin' | while read -r dir; do
|
||||
find ./node_modules -type d -name '.bin' -type l ! -lname '*/index.cjs' ! -lname 'index.cjs' | while read -r dir; do
|
||||
echo "Removing CLI scripts from $dir..."
|
||||
for f in "$dir"/*; do
|
||||
rm -f "$(realpath $f)" $f
|
||||
|
||||
Generated
BIN
Binary file not shown.
Reference in new issue
Block a user