* Rotated images did not work correctly.
* Removed ICO specific configuration, added copyright note about the source of this translator. * Disabled test mode for the build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20548 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -48,24 +48,13 @@ ConfigView::ConfigView(const BRect &frame, uint32 resize, uint32 flags)
|
|||||||
stringView->ResizeToPreferred();
|
stringView->ResizeToPreferred();
|
||||||
AddChild(stringView);
|
AddChild(stringView);
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 20);
|
|
||||||
BCheckBox *checkBox = new BCheckBox(rect, "color", "Write 32 bit images on true color input", NULL);
|
|
||||||
checkBox->ResizeToPreferred();
|
|
||||||
AddChild(checkBox);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 10);
|
rect.OffsetBy(0, height + 10);
|
||||||
checkBox = new BCheckBox(rect, "size", "Enforce valid icon sizes", NULL);
|
stringView = new BStringView(rect, "copyright2", "Based on Dave Coffin's dcraw 8.63");
|
||||||
checkBox->ResizeToPreferred();
|
|
||||||
checkBox->SetValue(1);
|
|
||||||
AddChild(checkBox);
|
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 15);
|
|
||||||
stringView = new BStringView(rect, "valid1", "Valid icon sizes are 16, 32, or 48");
|
|
||||||
stringView->ResizeToPreferred();
|
stringView->ResizeToPreferred();
|
||||||
AddChild(stringView);
|
AddChild(stringView);
|
||||||
|
|
||||||
rect.OffsetBy(0, height + 5);
|
rect.OffsetBy(0, height + 5);
|
||||||
stringView = new BStringView(rect, "valid2", "pixel in either direction.");
|
stringView = new BStringView(rect, "copyright3", B_UTF8_COPYRIGHT "1997-2007 Dave Coffin");
|
||||||
stringView->ResizeToPreferred();
|
stringView->ResizeToPreferred();
|
||||||
AddChild(stringView);
|
AddChild(stringView);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2376,12 +2376,6 @@ DCRaw::_LoadRAW(const image_data_info& image)
|
|||||||
void
|
void
|
||||||
DCRaw::_WriteRGB32(image_data_info& image, uint8* outputBuffer)
|
DCRaw::_WriteRGB32(image_data_info& image, uint8* outputBuffer)
|
||||||
{
|
{
|
||||||
fOutputWidth = fInputWidth;
|
|
||||||
fOutputHeight = fInputHeight;
|
|
||||||
|
|
||||||
if (image.flip & 4)
|
|
||||||
SWAP(fOutputHeight, fOutputWidth);
|
|
||||||
|
|
||||||
uint8* line, lookUpTable[0x10000];
|
uint8* line, lookUpTable[0x10000];
|
||||||
|
|
||||||
uint32 outputRow = (4 * fOutputBitsPerSample / 8) * fOutputWidth;
|
uint32 outputRow = (4 * fOutputBitsPerSample / 8) * fOutputWidth;
|
||||||
@@ -2398,10 +2392,13 @@ DCRaw::_WriteRGB32(image_data_info& image, uint8* outputBuffer)
|
|||||||
|
|
||||||
int32 sourceOffset = _FlipIndex(0, 0, image.flip);
|
int32 sourceOffset = _FlipIndex(0, 0, image.flip);
|
||||||
int32 colStep = _FlipIndex(0, 1, image.flip) - sourceOffset;
|
int32 colStep = _FlipIndex(0, 1, image.flip) - sourceOffset;
|
||||||
int32 rowStep = _FlipIndex(1, 0, image.flip) - _FlipIndex(0, fOutputWidth, image.flip);
|
int32 rowStep = _FlipIndex(1, 0, image.flip)
|
||||||
|
- _FlipIndex(0, fOutputWidth, image.flip);
|
||||||
|
|
||||||
TRACE(("flip = %ld, sourceOffset = %ld, colStep = %ld, rowStep = %ld, input: %lu x %lu, output: %lu x %lu\n",
|
TRACE(("flip = %ld, sourceOffset = %ld, colStep = %ld, rowStep = %ld, "
|
||||||
image.flip, sourceOffset, colStep, rowStep, fInputWidth, fInputHeight, fOutputWidth, fOutputHeight));
|
"input: %lu x %lu, output: %lu x %lu\n", image.flip, sourceOffset,
|
||||||
|
colStep, rowStep, fInputWidth, fInputHeight, fOutputWidth,
|
||||||
|
fOutputHeight));
|
||||||
|
|
||||||
if (fOutputBitsPerSample == 8) {
|
if (fOutputBitsPerSample == 8) {
|
||||||
for (uint32 row = 0; row < fOutputHeight; row++, sourceOffset += rowStep) {
|
for (uint32 row = 0; row < fOutputHeight; row++, sourceOffset += rowStep) {
|
||||||
@@ -3257,6 +3254,9 @@ DCRaw::ReadImageAt(uint32 index, uint8*& outputBuffer, size_t& bufferSize)
|
|||||||
fShrink = (fHalfSize || fThreshold) && fFilters;
|
fShrink = (fHalfSize || fThreshold) && fFilters;
|
||||||
fOutputWidth = (fInputWidth + fShrink) >> fShrink;
|
fOutputWidth = (fInputWidth + fShrink) >> fShrink;
|
||||||
fOutputHeight = (fInputHeight + fShrink) >> fShrink;
|
fOutputHeight = (fInputHeight + fShrink) >> fShrink;
|
||||||
|
if (image.flip & 4)
|
||||||
|
SWAP(fOutputHeight, fOutputWidth);
|
||||||
|
|
||||||
image.output_width = fOutputWidth;
|
image.output_width = fOutputWidth;
|
||||||
image.output_height = fOutputHeight;
|
image.output_height = fOutputHeight;
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
|
||||||
#define TEST_MODE 1
|
#define TEST_MODE 0
|
||||||
#define SHOW_MODE 1
|
#define SHOW_MODE 1
|
||||||
#if SHOW_MODE
|
#if SHOW_MODE && TEST_MODE
|
||||||
# include <Bitmap.h>
|
# include <Bitmap.h>
|
||||||
# include <BitmapStream.h>
|
# include <BitmapStream.h>
|
||||||
# include <View.h>
|
# include <View.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user