Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions pidet/Comment.cs

This file was deleted.

16 changes: 0 additions & 16 deletions pidet/main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.IO;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Windows.Media.Imaging;

namespace pidet
{
Expand Down Expand Up @@ -124,7 +123,6 @@ class pColor
LBlue = 12, Blue = 13, DBlue = 14, LMagenta = 15, Magenta = 16, DMagenta = 17, White = 18, Black = 19;
}
List<List<int>> codel = new List<List<int>>(), buffer = new List<List<int>>();
List<Comment> comments;
List<List<bool>> bp = new List<List<bool>>();
List<List<List<int>>> history = new List<List<List<int>>>();
int cSize = 20, sX = 3, sY = 3, hisIndex = -1, currentColor = 0, standardColor = 0;
Expand Down Expand Up @@ -1283,12 +1281,10 @@ void OpenFile(string openFilePath = "")
if (editMode == Mode.DEBUG_MODE) EndDebug();
FileStream fs = null;
Bitmap bmp = null;
BitmapFrame bmpframe = null;
try
{
fs = new FileStream(openFilePath, FileMode.Open, FileAccess.Read);
bmp = (Bitmap)Bitmap.FromStream(fs);
bmpframe = BitmapFrame.Create(fs);
}
catch (Exception)
{
Expand Down Expand Up @@ -1332,18 +1328,6 @@ void OpenFile(string openFilePath = "")
Marshal.Copy(buf, 0, bmpData.Scan0, buf.Length);
bmp.UnlockBits(bmpData);
bmp.Dispose();

BitmapMetadata metadata = (BitmapMetadata)bmpframe.Metadata.Clone();
for (int i = 0; (string)metadata.GetQuery("/[" + i.ToString() + "]iTXt/Keyword") != null; ++i)
{
string iTXtKeyword = (string)metadata.GetQuery("/[" + i.ToString() + "]iTXt/Keyword");
string iTXtTextEntry = (string)metadata.GetQuery("/[" + i.ToString() + "]iTXt/TextEntry");
if (iTXtKeyword == "Piet Source Code Comment(CAPPNG)")
{
comments.Add(Comment.Decode(iTXtTextEntry));
}
}

//sw.Stop();
//MessageBox.Show(sw.ElapsedMilliseconds.ToString());
ResetBP();
Expand Down
3 changes: 0 additions & 3 deletions pidet/pidet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<ApplicationIcon>pidet.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -46,10 +45,8 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Comment.cs" />
<Compile Include="main.cs">
<SubType>Form</SubType>
</Compile>
Expand Down