Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
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
55 changes: 55 additions & 0 deletions 55 ImageLibrary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,61 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DocumentationFile>bin\Release\Kaliko.ImageLibrary.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 2.0|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DocumentationFile>..\.build\net20\Kaliko.ImageLibrary.XML</DocumentationFile>
<OutputPath>..\.build\net20\</OutputPath>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 3.0|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DocumentationFile>..\.build\net30\Kaliko.ImageLibrary.XML</DocumentationFile>
<OutputPath>..\.build\net30\</OutputPath>
<TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 3.5|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DocumentationFile>..\.build\net35\Kaliko.ImageLibrary.XML</DocumentationFile>
<OutputPath>..\.build\net35\</OutputPath>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.0|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DocumentationFile>..\.build\net40\Kaliko.ImageLibrary.XML</DocumentationFile>
<OutputPath>..\.build\net40\</OutputPath>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.5|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<DocumentationFile>..\.build\net45\Kaliko.ImageLibrary.XML</DocumentationFile>
<OutputPath>..\.build\net45\</OutputPath>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
Expand Down
6 changes: 4 additions & 2 deletions 6 ImageLibrary.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageLibrary", "ImageLibrary.csproj", "{073C7180-35E8-442A-9334-AA3F529C0985}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{4381B75F-8E8B-4F82-AABC-A16AD72D201A}"
Expand Down
14 changes: 10 additions & 4 deletions 14 KalikoImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public class KalikoImage : IDisposable {
public KalikoImage(Image image) {
TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
Image = image;

MakeImageNonIndexed();

_g = Graphics.FromImage(Image);
}

Expand Down Expand Up @@ -334,7 +337,9 @@ public void DrawText(TextField textField) {
/// </summary>
/// <param name="fileName">File path</param>
public void LoadImage(string fileName) {
Image = Image.FromFile(fileName);
using (var bitmap = new Bitmap(fileName)) {
Image = new Bitmap(bitmap);
}

MakeImageNonIndexed();

Expand All @@ -346,7 +351,9 @@ public void LoadImage(string fileName) {
/// </summary>
/// <param name="stream">Pointer to stream</param>
public void LoadImage(Stream stream) {
Image = Image.FromStream(stream);
using (var bitmap = new Bitmap(stream)) {
Image = new Bitmap(bitmap);
}

MakeImageNonIndexed();

Expand Down Expand Up @@ -439,8 +446,7 @@ public KalikoImage Scale(ScalingBase scaleEngine) {



internal static void DrawScaledImage(
KalikoImage destinationImage, KalikoImage sourceImage, int x, int y, int width, int height) {
internal static void DrawScaledImage(KalikoImage destinationImage, KalikoImage sourceImage, int x, int y, int width, int height) {
DrawScaledImage(destinationImage.Image, sourceImage.Image, x, y, width, height);
}

Expand Down
31 changes: 31 additions & 0 deletions 31 ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### New in 2.0.5
* Rewritten file loader to prevent file locks
* Fixed image loading to ignore pixel-per-inch resolutions of original images
* Fixed constructor using System.Drawing.Image to support indexed palettes

### New in 2.0.4
* Added new TextField class for better text support
* Fixed scaling bug and updated test program

### New in 2.0.0
* Replaced Gaussian blur filter with better implementation (affects unsharpen masks)
* Added chroma key filter
* Rewritten API for Scaling
* Added color space handling

### New in 1.2.4
* Updated to Visual Studio 2010.
* Code clean-up.
* Unwanted-border-artifact-problem fixed (thanks Richard!)
* IDisponable has been implemented.

### New in 1.2.3
* Minor changes.
* First API documentation uploaded. Still missing a whole lot, but it's a start :)

### New in 1.2.2
* Minor changes

### New in 1.2.1
* Bug in thumbnail function fixed.
* Code cleaned up.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.