From 89b37b6ede255d2b8445e990f83742345ae72cdc Mon Sep 17 00:00:00 2001 From: Syping Date: Sun, 23 Nov 2025 03:33:46 +0100 Subject: [PATCH] impl. image processing and rename update-sign option to update-json --- Commands.Win32.cs | 73 ++++++++++ Commands.cs | 239 ++++++++++--------------------- Jpeg.cs | 42 ++++++ Json.cs | 55 ++++--- Properties/Resources.Designer.cs | 73 ---------- Properties/Resources.resx | 124 ---------------- Resources/empty.jpg | Bin 518 -> 0 bytes ragephoto-cli.csproj | 16 +-- 8 files changed, 232 insertions(+), 390 deletions(-) create mode 100644 Commands.Win32.cs create mode 100644 Jpeg.cs delete mode 100644 Properties/Resources.Designer.cs delete mode 100644 Properties/Resources.resx delete mode 100644 Resources/empty.jpg diff --git a/Commands.Win32.cs b/Commands.Win32.cs new file mode 100644 index 0000000..8336f11 --- /dev/null +++ b/Commands.Win32.cs @@ -0,0 +1,73 @@ +using Microsoft.Win32; +using System.CommandLine; +using System.Runtime.Versioning; +namespace RagePhoto.Cli; + +internal static partial class Commands { + + [SupportedOSPlatform("Windows")] + internal static Int32 PathFunction(String command) { + try { + if (command == "register" || command == "unregister") { + String appPath = Path.GetDirectoryName(Environment.ProcessPath) ?? + throw new Exception("Application Path can not be found"); + String fullAppPath = Path.TrimEndingDirectorySeparator(Path.GetFullPath(appPath)); + using RegistryKey environmentKey = Registry.LocalMachine.OpenSubKey( + @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment", true) ?? + throw new Exception("Environment Registry Key can not be opened"); + String? path = environmentKey.GetValue( + "Path", null, RegistryValueOptions.DoNotExpandEnvironmentNames) as String ?? + throw new Exception("Path Registry Value is invalid"); + List paths = [.. path.Split(';', StringSplitOptions.RemoveEmptyEntries)]; + for (Int32 i = 0; i < paths.Count; i++) { + if (!String.Equals( + fullAppPath, + Path.TrimEndingDirectorySeparator(Path.GetFullPath(paths[i])), + StringComparison.OrdinalIgnoreCase)) + continue; + if (command == "register") + return 0; + paths.RemoveAt(i); + environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString); + return 0; + } + if (command == "unregister") + return 0; + paths.Add(fullAppPath); + environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString); + return 0; + } + Console.Error.WriteLine("Invalid Path Command"); + return 1; + } + catch (Exception exception) { + Console.Error.WriteLine(exception.Message); + return -1; + } + } + + [SupportedOSPlatform("Windows")] + internal static Command PathCommand { + get { + Argument commandArgument = new("command") { + Description = "Path Command" + }; + commandArgument.CompletionSources.Add(_ => [ + new ("register"), + new ("unregister")]); + commandArgument.Validators.Add(result => { + String[] commands = ["register", "unregister"]; + String command = result.GetValueOrDefault(); + if (!commands.Contains(command, StringComparer.InvariantCultureIgnoreCase)) + result.AddError("Invalid Path Command."); + }); + Command pathCommand = new("path", "Register/Unregister Path") { + commandArgument + }; + pathCommand.Hidden = true; + pathCommand.SetAction(result => Environment.ExitCode = PathFunction( + result.GetRequiredValue(commandArgument))); + return pathCommand; + } + } +} diff --git a/Commands.cs b/Commands.cs index a6362fa..b3181d4 100644 --- a/Commands.cs +++ b/Commands.cs @@ -1,58 +1,46 @@ -using Microsoft.Win32; +using SixLabors.ImageSharp; using System.CommandLine; -using System.Runtime.InteropServices; using System.Text; namespace RagePhoto.Cli; -internal static class Commands { +internal static partial class Commands { - internal static Int32 CreateFunction(String format, String? jpegFile, String? description, String? json, String? title, String outputFile) { + internal static Int32 CreateFunction(String format, String? imageFile, String? description, String? json, String? title, String outputFile) { try { using Photo photo = new(); - photo.Format = format.ToLowerInvariant() switch { - "gta5" => PhotoFormat.GTA5, - "rdr2" => PhotoFormat.RDR2, - _ => throw new ArgumentException("Invalid Photo Format", nameof(format)) - }; - - if (photo.Format == PhotoFormat.GTA5) { - photo.SetHeader("PHOTO - 10/26/25 02:28:08", 798615001, 0); - } - else { - photo.SetHeader("PHOTO - 10/26/25 02:31:34", 3077307752, 2901366738); + switch (format.ToLowerInvariant()) { + case "gta5": + photo.Format = PhotoFormat.GTA5; + photo.SetHeader("PHOTO - 10/26/25 02:28:08", 798615001, 0); + break; + case "rdr2": + photo.Format = PhotoFormat.RDR2; + photo.SetHeader("PHOTO - 10/26/25 02:31:34", 3077307752, 2901366738); + break; + default: + throw new ArgumentException("Invalid Format", nameof(format)); } - if (String.IsNullOrEmpty(jpegFile)) { - photo.Jpeg = Properties.Resources.EmptyJpeg; + Size size; + if (String.IsNullOrEmpty(imageFile)) { + photo.Jpeg = Jpeg.GetEmptyJpeg(photo.Format, out size); } else { - using MemoryStream jpegStream = new(); - using Stream input = jpegFile == "-" ? Console.OpenStandardInput() : File.OpenRead(jpegFile); - input.CopyTo(jpegStream); - photo.Jpeg = jpegStream.ToArray(); + using Stream input = imageFile == "-" ? Console.OpenStandardInput() : File.OpenRead(imageFile); + photo.Jpeg = Jpeg.GetJpeg(input, out size); } - if (photo.Format == PhotoFormat.GTA5) { - photo.Json = json == null ? - Json.Initialize(PhotoFormat.GTA5, photo, Random.Shared.Next(), - DateTimeOffset.FromUnixTimeSeconds(Random.Shared.Next(1356998400, 1388534399))) : - Json.UpdateSign(photo, photo.Json); - } - else { - photo.Json = json == null ? - Json.Initialize(PhotoFormat.RDR2, photo, Random.Shared.Next(), - DateTimeOffset.FromUnixTimeSeconds(Random.Shared.NextInt64(-2240524800, -2208988801))) : - Json.UpdateSign(photo, photo.Json); - } + photo.Json = json == null ? + Json.Initialize(photo, size, out Int32 uid) : + Json.Update(photo, size, photo.Json, out uid); photo.Description = description ?? String.Empty; photo.Title = title ?? "Custom Photo"; if (outputFile == "-" || outputFile == String.Empty) { - using MemoryStream photoStream = new(photo.Save()); using Stream output = Console.OpenStandardOutput(); - photoStream.CopyTo(output); + output.Write(photo.Save()); } else { String tempFile = Path.GetTempFileName(); @@ -100,7 +88,7 @@ internal static class Commands { content = Encoding.UTF8.GetBytes($"{photo.Format switch { PhotoFormat.GTA5 => "gta5", PhotoFormat.RDR2 => "rdr2", - _ => "unknown" + _ => throw new ArgumentException("Invalid Format") }}\n"); break; case "i": @@ -126,15 +114,13 @@ internal static class Commands { } if (outputFile == "-" || outputFile == String.Empty) { - using MemoryStream contentStream = new(content); using Stream output = Console.OpenStandardOutput(); - contentStream.CopyTo(output); + output.Write(content); } else { String tempFile = Path.GetTempFileName(); - using (MemoryStream contentStream = new(content)) { - using FileStream output = File.Create(tempFile); - contentStream.CopyTo(output); + using (FileStream output = File.Create(tempFile)) { + output.Write(content); } File.Move(tempFile, outputFile, true); } @@ -150,18 +136,16 @@ internal static class Commands { } } - internal static Int32 SetFunction(String inputFile, String? format, String? jpegFile, String? description, String? json, String? title, bool updateSign, String? outputFile) { - if (format == null && jpegFile == null && description == null - && json == null && title == null && !updateSign) { - Console.Error.WriteLine("No value has being set"); - return 1; - } - else if (inputFile == "-" && jpegFile == "-") { - Console.Error.WriteLine("Multiple pipes are not supported"); - return 1; - } - + internal static Int32 SetFunction(String inputFile, String? format, String? imageFile, String? description, String? json, String? title, bool updateJson, String? outputFile) { try { + if (format == null && imageFile == null && description == null + && json == null && title == null && !updateJson) { + throw new ArgumentException("No Value has being set"); + } + else if ((inputFile == "-" || inputFile == String.Empty) && imageFile == "-") { + throw new ArgumentException("Multiple Pipes are not supported"); + } + using Photo photo = new(); if (inputFile == "-" || inputFile == String.Empty) { @@ -178,7 +162,7 @@ internal static class Commands { photo.Format = format.ToLowerInvariant() switch { "gta5" => PhotoFormat.GTA5, "rdr2" => PhotoFormat.RDR2, - _ => throw new ArgumentException("Invalid Photo Format", nameof(format)) + _ => throw new ArgumentException("Invalid Format", nameof(format)) }; } @@ -191,25 +175,24 @@ internal static class Commands { if (title != null) photo.Title = title; - if (jpegFile == String.Empty) { - photo.Jpeg = Properties.Resources.EmptyJpeg; - photo.Json = Json.UpdateSign(photo, photo.Json); + Size size; + if (imageFile == String.Empty) { + photo.Jpeg = Jpeg.GetEmptyJpeg(photo.Format, out size); + photo.Json = Json.Update(photo, size, photo.Json, out Int32 uid); } - else if (jpegFile != null) { - using MemoryStream jpegStream = new(); - using Stream input = jpegFile == "-" ? Console.OpenStandardInput() : File.OpenRead(jpegFile); - input.CopyTo(jpegStream); - photo.Jpeg = jpegStream.ToArray(); - photo.Json = Json.UpdateSign(photo, photo.Json); + else if (imageFile != null) { + using Stream input = imageFile == "-" ? Console.OpenStandardInput() : File.OpenRead(imageFile); + photo.Jpeg = Jpeg.GetJpeg(input, out size); + photo.Json = Json.Update(photo, size, photo.Json, out Int32 uid); } - else if (updateSign) { - photo.Json = Json.UpdateSign(photo, photo.Json); + else if (updateJson) { + size = Jpeg.GetSize(photo.Jpeg); + photo.Json = Json.Update(photo, size, photo.Json, out Int32 uid); } if (outputFile == "-") { - using MemoryStream photoStream = new(photo.Save()); using Stream output = Console.OpenStandardOutput(); - photoStream.CopyTo(output); + output.Write(photo.Save()); } else { String tempFile = Path.GetTempFileName(); @@ -232,52 +215,10 @@ internal static class Commands { } } - internal static Int32 PathFunction(String command) { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - return 0; - try { - if (command == "register" || command == "unregister") { - String appPath = Path.GetDirectoryName(Environment.ProcessPath) ?? - throw new Exception("Application Path can not be found"); - String fullAppPath = Path.TrimEndingDirectorySeparator(Path.GetFullPath(appPath)); - using RegistryKey environmentKey = Registry.LocalMachine.OpenSubKey( - @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment", true) ?? - throw new Exception("Environment Registry Key can not be opened"); - String? path = environmentKey.GetValue( - "Path", null, RegistryValueOptions.DoNotExpandEnvironmentNames) as String ?? - throw new Exception("Path Registry Value is invalid"); - List paths = [.. path.Split(';', StringSplitOptions.RemoveEmptyEntries)]; - for (Int32 i = 0; i < paths.Count; i++) { - if (!String.Equals( - fullAppPath, - Path.TrimEndingDirectorySeparator(Path.GetFullPath(paths[i])), - StringComparison.OrdinalIgnoreCase)) - continue; - if (command == "register") - return 0; - paths.RemoveAt(i); - environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString); - return 0; - } - if (command == "unregister") - return 0; - paths.Add(fullAppPath); - environmentKey.SetValue("Path", String.Join(";", paths), RegistryValueKind.ExpandString); - return 0; - } - Console.Error.WriteLine("Invalid Path Command"); - return 1; - } - catch (Exception exception) { - Console.Error.WriteLine(exception.Message); - return -1; - } - } - internal static Command CreateCommand { get { Argument formatArgument = new("format") { - Description = "Photo Format" + Description = "Format" }; formatArgument.CompletionSources.Add(_ => [ new("gta5"), @@ -286,30 +227,30 @@ internal static class Commands { String[] formats = ["gta5", "rdr2"]; String format = result.GetValueOrDefault(); if (!formats.Contains(format, StringComparer.InvariantCultureIgnoreCase)) - result.AddError("Invalid Photo Format."); + result.AddError("Invalid Format."); }); - Option jpegOption = new("--jpeg", "--image", "-i") { - Description = "JPEG File" + Option imageOption = new("--image", "-i", "--jpeg") { + Description = "Image File" }; Option descriptionOption = new("--description", "-d") { - Description = "Photo Description" + Description = "Description" }; Option jsonOption = new("--json", "-j") { - Description = "Photo JSON" + Description = "JSON" }; Option titleOption = new("--title", "-t") { - Description = "Photo Title" + Description = "Title" }; Option outputOption = new("--output", "-o") { Description = "Output File", DefaultValueFactory = _ => "-" }; Command createCommand = new("create", "Create a new Photo") { - formatArgument, jpegOption, descriptionOption, jsonOption, titleOption, outputOption + formatArgument, imageOption, descriptionOption, jsonOption, titleOption, outputOption }; createCommand.SetAction(result => Environment.ExitCode = CreateFunction( result.GetRequiredValue(formatArgument), - result.GetValue(jpegOption), + result.GetValue(imageOption), result.GetValue(descriptionOption), result.GetValue(jsonOption), result.GetValue(titleOption), @@ -323,39 +264,39 @@ internal static class Commands { Argument inputArgument = new("input") { Description = "Input File" }; - Argument dataTypeArgument = new("dataType") { + Argument typeArgument = new("type") { Description = "Data Type", DefaultValueFactory = _ => "jpeg" }; - dataTypeArgument.CompletionSources.Add(_ => [ + typeArgument.CompletionSources.Add(_ => [ new("description"), new("format"), new("jpeg"), new("json"), new("sign"), new("title")]); - dataTypeArgument.Validators.Add(result => { - String[] dataTypes = [ + typeArgument.Validators.Add(result => { + String[] types = [ "d", "description", "f", "format", "i", "image", "jpeg", "j", "json", "s", "sign", "t", "title"]; - String dataType = result.GetValueOrDefault(); - if (!dataTypes.Contains(dataType, StringComparer.InvariantCultureIgnoreCase)) - result.AddError($"Unknown Data Type: {dataType}."); + String type = result.GetValueOrDefault(); + if (!types.Contains(type, StringComparer.InvariantCultureIgnoreCase)) + result.AddError($"Unknown Data Type: {type}."); }); Option outputOption = new("--output", "-o") { Description = "Output File", DefaultValueFactory = _ => "-" }; Command getCommand = new("get", "Get Data from a Photo") { - inputArgument, dataTypeArgument, outputOption + inputArgument, typeArgument, outputOption }; getCommand.SetAction(result => Environment.ExitCode = GetFunction( result.GetRequiredValue(inputArgument), - result.GetRequiredValue(dataTypeArgument), + result.GetRequiredValue(typeArgument), result.GetRequiredValue(outputOption))); return getCommand; } @@ -367,63 +308,39 @@ internal static class Commands { Description = "Input File" }; Option formatOption = new("--format", "-f") { - Description = "Photo Format" + Description = "Format" }; - Option jpegOption = new("--jpeg", "--image", "-i") { - Description = "JPEG File" + Option imageOption = new("--image", "-i", "--jpeg") { + Description = "Image File" }; Option descriptionOption = new("--description", "-d") { - Description = "Photo Description" + Description = "Description" }; Option jsonOption = new("--json", "-j") { - Description = "Photo JSON" + Description = "JSON" }; Option titleOption = new("--title", "-t") { - Description = "Photo Title" + Description = "Title" }; - Option updateSignOption = new("--update-sign", "-u") { - Description = "Update Photo Signature" + Option updateJsonOption = new("--update-json", "-u") { + Description = "Update JSON" }; Option outputOption = new("--output", "-o") { Description = "Output File" }; Command setCommand = new("set", "Set Data from a Photo") { - inputArgument, formatOption, jpegOption, descriptionOption, jsonOption, titleOption, updateSignOption, outputOption + inputArgument, formatOption, imageOption, descriptionOption, jsonOption, titleOption, updateJsonOption, outputOption }; setCommand.SetAction(result => Environment.ExitCode = SetFunction( result.GetRequiredValue(inputArgument), result.GetValue(formatOption), - result.GetValue(jpegOption), + result.GetValue(imageOption), result.GetValue(descriptionOption), result.GetValue(jsonOption), result.GetValue(titleOption), - result.GetValue(updateSignOption), + result.GetValue(updateJsonOption), result.GetValue(outputOption))); return setCommand; } } - - internal static Command PathCommand { - get { - Argument commandArgument = new("command") { - Description = "Path Command" - }; - commandArgument.CompletionSources.Add(_ => [ - new ("register"), - new ("unregister")]); - commandArgument.Validators.Add(result => { - String[] commands = ["register", "unregister"]; - String command = result.GetValueOrDefault(); - if (!commands.Contains(command, StringComparer.InvariantCultureIgnoreCase)) - result.AddError("Invalid Path Command."); - }); - Command pathCommand = new("path", "Register/Unregister Path") { - commandArgument - }; - pathCommand.Hidden = true; - pathCommand.SetAction(result => Environment.ExitCode = PathFunction( - result.GetRequiredValue(commandArgument))); - return pathCommand; - } - } } diff --git a/Jpeg.cs b/Jpeg.cs new file mode 100644 index 0000000..906a2f1 --- /dev/null +++ b/Jpeg.cs @@ -0,0 +1,42 @@ +using SixLabors.ImageSharp; +using SixLabors.ImageSharp.Formats.Jpeg; +using SixLabors.ImageSharp.PixelFormats; +namespace RagePhoto.Cli; + +internal class Jpeg { + + internal static Byte[] GetEmptyJpeg(PhotoFormat format, out Size size) { + size = format == PhotoFormat.GTA5 ? new(960, 536) : new(1920, 1080); + using Image image = new(size.Width, size.Height); + image.ProcessPixelRows(static pixelAccessor => { + for (Int32 y = 0; y < pixelAccessor.Height; y++) { + Span pixelRow = pixelAccessor.GetRowSpan(y); + for (Int32 x = 0; x < pixelRow.Length; x++) { + pixelRow[x] = Color.Black; + } + } + }); + using MemoryStream output = new(); + image.SaveAsJpeg(output, new() { + Quality = 100, + ColorType = JpegEncodingColor.YCbCrRatio444 + }); + return output.ToArray(); + } + + internal static Byte[] GetJpeg(Stream stream, out Size size) { + using Image image = Image.Load(stream); + size = image.Size; + image.Metadata.ExifProfile = null; + using MemoryStream output = new(); + image.SaveAsJpeg(output, new() { + Quality = 100, + ColorType = JpegEncodingColor.YCbCrRatio444 + }); + return output.ToArray(); + } + + internal static Size GetSize(ReadOnlySpan jpeg) { + return Image.Identify(jpeg).Size; + } +} diff --git a/Json.cs b/Json.cs index b4ed070..9d28929 100644 --- a/Json.cs +++ b/Json.cs @@ -1,25 +1,32 @@ -using System.Text.Encodings.Web; +using SixLabors.ImageSharp; +using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Nodes; namespace RagePhoto.Cli; internal class Json { - internal static String Initialize(PhotoFormat format, Photo photo, Int32 photoUid, DateTimeOffset photoTime) { + internal static String Initialize(Photo photo, Size size, out Int32 uid) { JsonObject jsonLocation = new() { ["x"] = 0, ["y"] = 0, ["z"] = 0 }; + DateTimeOffset time = DateTimeOffset.FromUnixTimeSeconds(photo.Format switch { + PhotoFormat.GTA5 => Random.Shared.Next(1356998400, 1388534399), + PhotoFormat.RDR2 => Random.Shared.NextInt64(-2240524800, -2208988801), + _ => throw new ArgumentException("Invalid Format") + }); JsonObject jsonTime = new() { - ["hour"] = photoTime.Hour, - ["minute"] = photoTime.Minute, - ["second"] = photoTime.Second, - ["day"] = photoTime.Day, - ["month"] = photoTime.Month, - ["year"] = photoTime.Year + ["hour"] = time.Hour, + ["minute"] = time.Minute, + ["second"] = time.Second, + ["day"] = time.Day, + ["month"] = time.Month, + ["year"] = time.Year }; - JsonObject json = format switch { + uid = Random.Shared.Next(); + JsonObject json = photo.Format switch { PhotoFormat.GTA5 => new() { ["loc"] = jsonLocation, ["area"] = "SANAND", @@ -32,7 +39,7 @@ internal class Json { ["mid"] = String.Empty, ["mode"] = "FREEMODE", ["meme"] = false, - ["uid"] = photoUid, + ["uid"] = uid, ["time"] = jsonTime, ["creat"] = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), ["slf"] = true, @@ -54,7 +61,7 @@ internal class Json { ["mode"] = "SP", ["meme"] = false, ["mug"] = false, - ["uid"] = photoUid, + ["uid"] = uid, ["time"] = jsonTime, ["creat"] = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), ["slf"] = false, @@ -62,26 +69,40 @@ internal class Json { ["rsedtr"] = false, ["inphotomode"] = true, ["advanced"] = false, - ["width"] = 1920, - ["height"] = 1080, + ["width"] = size.Width, + ["height"] = size.Height, ["size"] = photo.JpegSize, ["sign"] = photo.Sign, ["meta"] = new JsonObject() }, - _ => throw new ArgumentException("Invalid format", nameof(format)), + _ => throw new ArgumentException("Invalid Format") }; return json.ToJsonString(SerializerOptions); } - internal static String UpdateSign(Photo photo, String json) { + internal static String Update(Photo photo, Size size, String json, out Int32 uid) { try { if (JsonNode.Parse(json) is not JsonObject jsonObject) - throw new ArgumentException("Invalid json", nameof(json)); + throw new ArgumentException("Invalid JSON", nameof(json)); + if (jsonObject["uid"] is not JsonValue uidValue || + uidValue.GetValueKind() != JsonValueKind.Number) { + uid = Random.Shared.Next(); + jsonObject["uid"] = uid; + } + else { + uid = uidValue.GetValue(); + } + if (photo.Format == PhotoFormat.RDR2) { + jsonObject["width"] = size.Width; + jsonObject["height"] = size.Height; + } jsonObject["sign"] = photo.Sign; + jsonObject["size"] = photo.JpegSize; return jsonObject.ToJsonString(SerializerOptions); } catch (Exception exception) { - Console.Error.WriteLine($"Failed to update sign: {exception.Message}"); + Console.Error.WriteLine($"Failed to update JSON: {exception.Message}"); + uid = 0; return json; } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs deleted file mode 100644 index ad36530..0000000 --- a/Properties/Resources.Designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace RagePhoto.Cli.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RagePhoto.Cli.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Byte[]. - /// - internal static byte[] EmptyJpeg { - get { - object obj = ResourceManager.GetObject("EmptyJpeg", resourceCulture); - return ((byte[])(obj)); - } - } - } -} diff --git a/Properties/Resources.resx b/Properties/Resources.resx deleted file mode 100644 index c28828f..0000000 --- a/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\empty.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Resources/empty.jpg b/Resources/empty.jpg deleted file mode 100644 index f25f972d40ce05106584a2186d2513e05f85913b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 518 zcmbu4O$x$L41{N1P>Q(71NY)d-a;tYQ+Si!O+17@8+RTfCKLrre-@pr624?6cC#0> zsZTXX;_L-`;uzf`#gRn^V%aXp6$lD5Ql@0u6+55&YZFtC-;+JC6(Xr9!14}Chp5VT rxk_ySc^D9~a0*C2VANt=I*U<&<NF6ZY=)nC0uA@8S diff --git a/ragephoto-cli.csproj b/ragephoto-cli.csproj index 02036d8..548316f 100644 --- a/ragephoto-cli.csproj +++ b/ragephoto-cli.csproj @@ -16,23 +16,9 @@ true - - - True - True - Resources.resx - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - - - +