Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for 1bpp conversion - Fixes #15

  • Loading branch information...
commit de3aacdbe97ab1330eacf032d56e8a5edd589145 1 parent d65e5a5
@charlesw authored
Showing with 202 additions and 79 deletions.
  1. +27 −1 Tesseract.Net20/BitmapHelper.cs
  2. +5 −3 Tesseract.Net20/BitmapToPixConverter.cs
  3. +6 −6 Tesseract.Net20/PixColormap.cs
  4. +58 −18 Tesseract.Net20/PixData.cs
  5. +24 −3 Tesseract.Net20/PixToBitmapConverter.cs
  6. +2 −5 Tesseract.Tests.Console/Program.cs
  7. BIN  Tesseract.Tests/Data/Conversion/photo.bmp
  8. BIN  Tesseract.Tests/Data/Conversion/photo.gif
  9. BIN  Tesseract.Tests/Data/Conversion/photo.jpg
  10. BIN  Tesseract.Tests/Data/Conversion/photo.png
  11. BIN  Tesseract.Tests/Data/Conversion/photo_24.bmp
  12. BIN  Tesseract.Tests/Data/Conversion/photo_24.png
  13. BIN  Tesseract.Tests/Data/Conversion/photo_32.png
  14. BIN  Tesseract.Tests/Data/Conversion/photo_8.bmp
  15. BIN  Tesseract.Tests/Data/Conversion/photo_8.png
  16. BIN  Tesseract.Tests/Data/Conversion/photo_grayscale_1bpp.tif
  17. BIN  Tesseract.Tests/Data/Conversion/photo_grayscale_4bpp.tif
  18. BIN  Tesseract.Tests/Data/Conversion/photo_palette_1bpp.tif
  19. BIN  Tesseract.Tests/Data/Conversion/photo_palette_4bpp.tif
  20. BIN  Tesseract.Tests/Data/Conversion/photo_palette_8bpp.tif
  21. 0  Tesseract.Tests/Data/Conversion/{photo.tif → photo_rgb_32bpp.tif}
  22. +68 −19 Tesseract.Tests/Leptonica/ConvertBitmapToPixTests.cs
  23. +12 −24 Tesseract.Tests/Tesseract.Tests.csproj
View
28 Tesseract.Net20/BitmapHelper.cs
@@ -7,7 +7,33 @@ namespace Tesseract
/// Description of BitmapHelper.
/// </summary>
public static unsafe class BitmapHelper
- {
+ {
+ /// <summary>
+ /// gets the number of Bits Per Pixel (BPP)
+ /// </summary>
+ /// <param name="source"></param>
+ /// <returns></returns>
+ public static int GetBPP(System.Drawing.Bitmap bitmap)
+ {
+ switch (bitmap.PixelFormat) {
+ case System.Drawing.Imaging.PixelFormat.Format1bppIndexed: return 1;
+ case System.Drawing.Imaging.PixelFormat.Format4bppIndexed: return 4;
+ case System.Drawing.Imaging.PixelFormat.Format8bppIndexed: return 8;
+ case System.Drawing.Imaging.PixelFormat.Format16bppArgb1555:
+ case System.Drawing.Imaging.PixelFormat.Format16bppGrayScale:
+ case System.Drawing.Imaging.PixelFormat.Format16bppRgb555:
+ case System.Drawing.Imaging.PixelFormat.Format16bppRgb565: return 16;
+ case System.Drawing.Imaging.PixelFormat.Format24bppRgb: return 24;
+ case System.Drawing.Imaging.PixelFormat.Format32bppArgb:
+ case System.Drawing.Imaging.PixelFormat.Format32bppPArgb:
+ case System.Drawing.Imaging.PixelFormat.Format32bppRgb: return 32;
+ case System.Drawing.Imaging.PixelFormat.Format48bppRgb: return 48;
+ case System.Drawing.Imaging.PixelFormat.Format64bppArgb:
+ case System.Drawing.Imaging.PixelFormat.Format64bppPArgb: return 64;
+ default: throw new ArgumentException(String.Format("The bitmap's pixel format of {0} was not recognised.", bitmap.PixelFormat), "bitmap");
+ }
+ }
+
#region Bitmap Data Access
#if Net45
View
8 Tesseract.Net20/BitmapToPixConverter.cs
@@ -74,6 +74,8 @@ private void CopyColormap(Bitmap img, Pix pix)
private int GetPixDepth(PixelFormat pixelFormat)
{
switch (pixelFormat) {
+ case PixelFormat.Format1bppIndexed:
+ return 1;
case PixelFormat.Format8bppIndexed:
return 8;
case PixelFormat.Format32bppArgb:
@@ -144,14 +146,14 @@ private unsafe void TransferDataFormat8bppIndexed(BitmapData imgData, PixData pi
private unsafe void TransferDataFormat1bppIndexed(BitmapData imgData, PixData pixData)
{
var height = imgData.Height;
- var width = imgData.Width;
+ var width = imgData.Width/8;
for (int y = 0; y < height; y++) {
byte* imgLine = (byte*)imgData.Scan0 + (y * imgData.Stride);
uint* pixLine = (uint*)pixData.Data + (y * pixData.WordsPerLine);
for (int x = 0; x < width; x++) {
- byte pixelVal = BitmapHelper.GetDataBit(imgLine, x);
- PixData.SetDataBit(pixLine, x, pixelVal);
+ byte pixelVal = BitmapHelper.GetDataByte(imgLine, x);
+ PixData.SetDataByte(pixLine, x, pixelVal);
}
}
}
View
12 Tesseract.Net20/PixColormap.cs
@@ -22,8 +22,8 @@ internal PixColormap(IntPtr handle)
public static PixColormap Create(int depth)
{
- if (!(depth == 2 || depth == 4 || depth == 8)) {
- throw new ArgumentOutOfRangeException("depth", "Depth must be 2, 4, or 8 bpp.");
+ if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8)) {
+ throw new ArgumentOutOfRangeException("depth", "Depth must be 1, 2, 4, or 8 bpp.");
}
var handle = Interop.LeptonicaApi.pixcmapCreate(depth);
@@ -35,8 +35,8 @@ public static PixColormap Create(int depth)
public static PixColormap CreateLinear(int depth, int levels)
{
- if (!(depth == 2 || depth == 4 || depth == 8)) {
- throw new ArgumentOutOfRangeException("depth", "Depth must be 2, 4, or 8 bpp.");
+ if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8)) {
+ throw new ArgumentOutOfRangeException("depth", "Depth must be 1, 2, 4, or 8 bpp.");
}
if (levels < 2 || levels > (2 << depth))
throw new ArgumentOutOfRangeException("levels", "Depth must be 2 and 2^depth (inclusive).");
@@ -50,8 +50,8 @@ public static PixColormap CreateLinear(int depth, int levels)
public static PixColormap CreateLinear(int depth, bool firstIsBlack, bool lastIsWhite)
{
- if (!(depth == 2 || depth == 4 || depth == 8)) {
- throw new ArgumentOutOfRangeException("depth", "Depth must be 2, 4, or 8 bpp.");
+ if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8)) {
+ throw new ArgumentOutOfRangeException("depth", "Depth must be 1, 2, 4, or 8 bpp.");
}
var handle = Interop.LeptonicaApi.pixcmapCreateRandom(depth, firstIsBlack ? 1 : 0, lastIsWhite ? 1 : 0);
View
76 Tesseract.Net20/PixData.cs
@@ -51,6 +51,9 @@ public static uint EncodeAsRGBA(byte red, byte green, byte blue, byte alpha)
alpha);
}
+ /// <summary>
+ /// Gets the pixel value for a 1bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -59,6 +62,10 @@ public static uint GetDataBit(uint* data, int index)
return (*(data + ((index) >> 5)) >> (31 - ((index) & 31))) & 1;
}
+
+ /// <summary>
+ /// Sets the pixel value for a 1bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -68,7 +75,11 @@ public static void SetDataBit(uint* data, int index, uint value)
*wordPtr &= ~(0x80000000 >> ((index) & 31));
*wordPtr |= (value << (31 - ((index) & 31)));
}
-
+
+
+ /// <summary>
+ /// Gets the pixel value for a 2bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -76,9 +87,12 @@ public static uint GetDataDIBit(uint* data, int index)
{
return (*(data + ((index) >> 4)) >> (2 * (15 - ((index) & 15)))) & 3;
}
-
-
-
+
+
+
+ /// <summary>
+ /// Sets the pixel value for a 2bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -88,7 +102,11 @@ public static void SetDataDIBit(uint* data, int index, uint value)
*wordPtr &= ~(0xc0000000 >> (2 * ((index) & 15)));
*wordPtr |= (((value) & 3) << (30 - 2 * ((index) & 15)));
}
-
+
+
+ /// <summary>
+ /// Gets the pixel value for a 4bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -96,8 +114,11 @@ public static uint GetDataQBit(uint* data, int index)
{
return (*(data + ((index) >> 3)) >> (4 * (7 - ((index) & 7)))) & 0xf;
}
-
-
+
+
+ /// <summary>
+ /// Sets the pixel value for a 4bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -107,8 +128,11 @@ public static void SetDataQBit(uint* data, int index, uint value)
*wordPtr &= ~(0xf0000000 >> (4 * ((index) & 7)));
*wordPtr |= (((value) & 15) << (28 - 4 * ((index) & 7)));
}
-
-
+
+
+ /// <summary>
+ /// Gets the pixel value for a 8bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -124,8 +148,11 @@ public static uint GetDataByte(uint* data, int index)
return *((byte*)data + index);
#endif
}
-
-
+
+
+ /// <summary>
+ /// Sets the pixel value for a 8bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -141,8 +168,11 @@ public static void SetDataByte(uint* data, int index, uint value)
*((byte*)data + index) = (byte)value;
#endif
}
-
-
+
+
+ /// <summary>
+ /// Gets the pixel value for a 16bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -158,8 +188,11 @@ public static uint GetDataTwoByte(uint* data, int index)
return *((ushort*)data + index);
#endif
}
-
-
+
+
+ /// <summary>
+ /// Sets the pixel value for a 16bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -175,7 +208,11 @@ public static void SetDataTwoByte(uint* data, int index, uint value)
*((ushort*)data + index) = (ushort)value;
#endif
}
-
+
+
+ /// <summary>
+ /// Gets the pixel value for a 32bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
@@ -183,8 +220,11 @@ public static uint GetDataFourByte(uint* data, int index)
{
return *(data + index);
}
-
-
+
+
+ /// <summary>
+ /// Sets the pixel value for a 32bpp image.
+ /// </summary>
#if Net45
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
View
27 Tesseract.Net20/PixToBitmapConverter.cs
@@ -34,6 +34,8 @@ public Bitmap Convert(Pix pix, bool includeAlpha = false)
TransferData16(pixData, imgData);
} else if (depth == 8) {
TransferData8(pixData, imgData);
+ } else if (depth == 1) {
+ TransferData1(pixData, imgData);
}
return img;
} catch (Exception) {
@@ -104,10 +106,29 @@ private unsafe void TransferData8(PixData pixData, BitmapData imgData)
}
}
+ private unsafe void TransferData1(PixData pixData, BitmapData imgData)
+ {
+ var imgFormat = imgData.PixelFormat;
+ var height = imgData.Height;
+ var width = imgData.Width/8;
+
+ for (int y = 0; y < height; y++) {
+ uint* pixLine = (uint*)pixData.Data + (y * pixData.WordsPerLine);
+ byte* imgLine = (byte*)imgData.Scan0 + (y * imgData.Stride);
+
+ for (int x = 0; x < width; x++) {
+ byte pixVal = (byte)PixData.GetDataByte(pixLine, x);
+
+ imgLine[x] = pixVal;
+ }
+ }
+ }
+
private void TransferPalette(Pix pix, Bitmap img)
{
var pallete = img.Palette;
var maxColors = pallete.Entries.Length;
+ var lastColor = maxColors - 1;
var colormap = pix.Colormap;
if (colormap != null && colormap.Count <= maxColors) {
var colormapCount = colormap.Count;
@@ -116,7 +137,7 @@ private void TransferPalette(Pix pix, Bitmap img)
}
} else {
for (int i = 0; i < maxColors; i++) {
- var value = (byte)(i % maxColors);
+ var value = (byte)(i * 255 / lastColor);
pallete.Entries[i] = SD.Color.FromArgb(value, value, value);
}
}
@@ -128,9 +149,9 @@ private void TransferPalette(Pix pix, Bitmap img)
private PixelFormat GetPixelFormat(Pix pix)
{
switch (pix.Depth) {
- //case 1: return PixelFormat.Format1bppIndexed;
+ case 1: return PixelFormat.Format1bppIndexed;
//case 2: return PixelFormat.Format4bppIndexed;
- // case 4: return PixelFormat.Format4bppIndexed;
+ //case 4: return PixelFormat.Format4bppIndexed;
case 8: return PixelFormat.Format8bppIndexed;
case 16: return PixelFormat.Format16bppGrayScale;
case 32: return PixelFormat.Format32bppArgb;
View
7 Tesseract.Tests.Console/Program.cs
@@ -10,11 +10,8 @@ class Program
{
static void Main(string[] args)
{
- //var testFixture = new Tesseract.Tests.Leptonica.ConvertBitmapToPixTests();
- //testFixture.Convert_PixToBitmap("photo_8.bmp", true);
-
- var testFixture = new Tesseract.Tests.Leptonica.PixTests.ScewTests();
- testFixture.DescewTest();
+ var testFixture = new Tesseract.Tests.Leptonica.ConvertBitmapToPixTests();
+ testFixture.Convert_BitmapToPix(1);
}
}
}
View
BIN  Tesseract.Tests/Data/Conversion/photo.bmp
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo.gif
Deleted file not rendered
View
BIN  Tesseract.Tests/Data/Conversion/photo.jpg
Deleted file not rendered
View
BIN  Tesseract.Tests/Data/Conversion/photo.png
Deleted file not rendered
View
BIN  Tesseract.Tests/Data/Conversion/photo_24.bmp
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo_24.png
Deleted file not rendered
View
BIN  Tesseract.Tests/Data/Conversion/photo_32.png
Deleted file not rendered
View
BIN  Tesseract.Tests/Data/Conversion/photo_8.bmp
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo_8.png
Deleted file not rendered
View
BIN  Tesseract.Tests/Data/Conversion/photo_grayscale_1bpp.tif
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo_grayscale_4bpp.tif
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo_palette_1bpp.tif
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo_palette_4bpp.tif
Binary file not shown
View
BIN  Tesseract.Tests/Data/Conversion/photo_palette_8bpp.tif
Binary file not shown
View
0  Tesseract.Tests/Data/Conversion/photo.tif → ...Tests/Data/Conversion/photo_rgb_32bpp.tif
File renamed without changes
View
87 Tesseract.Tests/Leptonica/ConvertBitmapToPixTests.cs
@@ -13,37 +13,70 @@ namespace Tesseract.Tests.Leptonica
public class ConvertBitmapToPixTests
{
const string DataDirectory = @"Data\Conversion\";
+ const string ResultsDirectory = @"Results\Conversion\";
[Test]
- public unsafe void Convert_BitmapToPix(
- [Values("photo.jpg", "photo.bmp", "photo_8.bmp", "photo_24.bmp", "photo.png", "photo_8.png", "photo_24.png", "photo_32.png", "photo.tif", "photo.gif")]
- string sourceFile)
+ [TestCase(1)] // Note: 1bpp will not save pixmap when writing out the result, this is a limitation of leptonica (see pixWriteToTiffStream)
+ [TestCase(4, Ignore = true, Reason = "4bpp images not supported.")]
+ [TestCase(8)]
+ [TestCase(32)]
+ public unsafe void Convert_BitmapToPix(int depth)
{
+ if (!Directory.Exists(ResultsDirectory)) Directory.CreateDirectory(ResultsDirectory);
+
+ string pixType;
+ if (depth < 16) pixType = "palette";
+ else if (depth == 16) pixType = "grayscale";
+ else pixType = "rgb";
+
+ var sourceFile = String.Format("photo_{0}_{1}bpp.tif", pixType, depth);
var sourceFilePath = Path.Combine(DataDirectory, sourceFile);
var bitmapConverter = new BitmapToPixConverter();
using (var source = new Bitmap(sourceFilePath)) {
+ Assert.That(BitmapHelper.GetBPP(source), Is.EqualTo(depth));
using (var dest = bitmapConverter.Convert(source)) {
- AssertAreEquivalent(source, dest, true);
+ var destFilename = String.Format("BitmapToPix_{0}_{1}bpp.tif", pixType, depth);
+ dest.Save(Path.Combine(ResultsDirectory, destFilename), ImageFormat.Tiff);
- //dest.Save("converted_img.bmp");
+ AssertAreEquivalent(source, dest, true);
}
}
}
[Test]
- public unsafe void Convert_PixToBitmap(
- [Values("photo.jpg", "photo.bmp", "photo_8.bmp", "photo_24.bmp", "photo.png", "photo_8.png", "photo_24.png", "photo_32.png", "photo.tif", "photo.gif")]
- string sourceFile,
- [Values(true, false)]
- bool includeAlpha)
+ [TestCase(1, true, false)]
+ [TestCase(1, false, false)]
+ [TestCase(4, false, false, Ignore = true, Reason = "4bpp images not supported.")]
+ [TestCase(4, true, false, Ignore = true, Reason = "4bpp images not supported.")]
+ [TestCase(8, false, false)]
+ [TestCase(8, true, false, Ignore = true, Reason = "Haven't yet created a 8bpp grayscale test image.")]
+ [TestCase(32, false, true)]
+ [TestCase(32, false, false)]
+ public unsafe void Convert_PixToBitmap(int depth, bool isGrayscale, bool includeAlpha)
{
+ if (!Directory.Exists(ResultsDirectory)) Directory.CreateDirectory(ResultsDirectory);
+
+ bool hasPalette = depth < 16 && !isGrayscale;
+ string pixType;
+ if (isGrayscale) pixType = "grayscale";
+ else if (hasPalette) pixType = "palette";
+ else pixType = "rgb";
+
+ var sourceFile = String.Format("photo_{0}_{1}bpp.tif", pixType, depth);
var sourceFilePath = Path.Combine(DataDirectory, sourceFile);
var converter = new PixToBitmapConverter();
using (var source = Pix.LoadFromFile(sourceFilePath)) {
+ Assert.That(source.Depth, Is.EqualTo(depth));
+ if (hasPalette) {
+ Assert.That(source.Colormap, Is.Not.Null, "Expected source image to have color map\\palette.");
+ } else {
+ Assert.That(source.Colormap, Is.Null, "Expected source image to be grayscale.");
+ }
using (var dest = converter.Convert(source, includeAlpha)) {
- AssertAreEquivalent(dest, source, includeAlpha);
+ var destFilename = String.Format("PixToBitmap_{0}_{1}bpp.tif", pixType, depth);
+ dest.Save(Path.Combine(ResultsDirectory, destFilename), System.Drawing.Imaging.ImageFormat.Tiff);
- // dest.Save("converted_pix.bmp");
+ AssertAreEquivalent(dest, source, includeAlpha);
}
}
}
@@ -60,8 +93,8 @@ private void AssertAreEquivalent(Bitmap bmp, Pix pix, bool checkAlpha)
// do some random sampling over image
var height = pix.Height;
var width = pix.Width;
- for (int y = 0; y < height; y += height / 4) {
- for (int x = 0; x < width; x += width / 4) {
+ for (int y = 0; y < height; y += height) {
+ for (int x = 0; x < width; x += width) {
PixColor sourcePixel = (PixColor)bmp.GetPixel(x, y);
PixColor destPixel = GetPixel(pix, x, y);
if (checkAlpha) {
@@ -75,15 +108,31 @@ private void AssertAreEquivalent(Bitmap bmp, Pix pix, bool checkAlpha)
private unsafe PixColor GetPixel(Pix pix, int x, int y)
{
+ var pixDepth = pix.Depth;
var pixData = pix.GetData();
+ var pixLine = (uint*)pixData.Data + pixData.WordsPerLine * y;
+ uint pixValue;
+ if (pixDepth == 1) {
+ pixValue = PixData.GetDataBit(pixLine, x);
+ } else if (pixDepth == 4) {
+ pixValue = PixData.GetDataQBit(pixLine, x);
+ } else if (pixDepth == 8) {
+ pixValue = PixData.GetDataByte(pixLine, x);
+ } else if (pixDepth == 32) {
+ pixValue = PixData.GetDataFourByte(pixLine, x);
+ } else {
+ throw new ArgumentException(String.Format("Bit depth of {0} is not supported.", pix.Depth), "pix");
+ }
if (pix.Colormap != null) {
- var pixLine = (uint*)pixData.Data + pixData.WordsPerLine * y;
- var pixValue = (int)PixData.GetDataByte(pixLine, x);
- return pix.Colormap[pixValue];
+ return pix.Colormap[(int)pixValue];
} else {
- var pixLine = (uint*)pixData.Data + pixData.WordsPerLine * y;
- return PixColor.FromRgba(pixLine[x]);
+ if (pixDepth == 32) {
+ return PixColor.FromRgba(pixValue);
+ } else {
+ byte grayscale = (byte)(pixValue * 255 / ((1 << 16) - 1));
+ return new PixColor(grayscale, grayscale, grayscale);
+ }
}
}
}
View
36 Tesseract.Tests/Tesseract.Tests.csproj
@@ -75,26 +75,23 @@
<Compile Include="TesseractResultSet.cs" />
</ItemGroup>
<ItemGroup>
- <Content Include="Data\Conversion\photo.bmp">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <Content Include="Data\Conversion\photo_grayscale_1bpp.tif">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="Data\Conversion\photo.gif">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <Content Include="Data\Conversion\photo_grayscale_4bpp.tif">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="Data\Conversion\photo.jpg">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <Content Include="Data\Conversion\photo_palette_1bpp.tif">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="Data\Conversion\photo.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <Content Include="Data\Conversion\photo_palette_4bpp.tif">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="Data\Conversion\photo.tif">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="Data\Conversion\photo_24.bmp">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <Content Include="Data\Conversion\photo_palette_8bpp.tif">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
- <Content Include="Data\Conversion\photo_8.bmp">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <Content Include="Data\Conversion\photo_rgb_32bpp.tif">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Data\Scew\scewed-phototest.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -102,15 +99,6 @@
<Content Include="phototest.tif">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="Data\Conversion\photo_24.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="Data\Conversion\photo_32.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="Data\Conversion\photo_8.png">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Tesseract.Net45\Tesseract.Net45.csproj">
Please sign in to comment.
Something went wrong with that request. Please try again.