Code Monkey home page Code Monkey logo

imageresizer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imageresizer's Issues

Context menu crashes

After trying to open context menu of image files (right click) Windows Explorer crashes, so does Total Commander. Issue remains also after the program is unistalled. Any advice how to fix context menu?

Version 3.0 (after that I've tried to install 3.1 beta 2, doesn't help)
Windows 10 latest update

Image Resizer reports not enough memory

I'm trying out Image Resizer for the first time. I select 28 files in Windows Explorer, then click the "Resize pictures" context menu, then select the smallest size and tell Image Resizer to only shrink the files.

I get the following error message (translated from Danish):

Resize completed with problems
021.png
Not sufficient memory to complete the program.
015.png
Not sufficient memory to complete the program.
028.png
Not sufficient memory to complete the program.

The files are no secret as they are part of a public article on the Internet so I have attached them in an archive. Try uncompressing the archive and then select all the images and resize them to the smallest size.

tinified.zip

My system has 16 GB RAM of which some 6 GB are currently free. Besides it has a huge swap file.

Windows 8.1 Home x64 Danish.

Windows %TEMP% is located on a RAM disk with about 1.8 gigabyte free space. This may be the culprit but if so, I guess Image Resizer is resizing all pictures before deleting the originals and also is using a lot of space just for resizing.

files deleted - temporary files location?

greetings, had a bunch of photos on an SD inside my camera (sony cybershot dscw730). mounted as a USB storage device, selected the photos in the DCIM folder, selected resize, and the image resizer for windows (to medium size) was part way along its progress bar when the app closed down, and all of the photos were deleted.

can you please advise where any temporary files are kept for this program, whether this is a known bug etc.

many thanks,
qotsa

Profile-based encoding / level of compression

It would be very helpful if the profiles (Small, Medium, Large, etc.) would not only include the height and width, but also the level of compression. Right now you're planning to have the encoding value to be global for all profiles. I recommend to allow custom encoding values for each profile.

For example I'd like to have my "Small"-profile with a JPEG quality level of "70" for quickly sending them as email attachments. But I'd also like to have an "Archive"-profile where the size is reduced to 50% with a JPEG quality level of 95%. I'd use this profile for archiving unimportant photos from my DSLR camera to save space, without giving up too much of the image quality.

Custom default sizes

From the Advanced settings dialog, users should be able to create, update, and delete items form the list of selectable sizes.

More filename parameters

Version 3.1.0 supports the following parameters:

  • Original filename
  • Size name
  • Size width
  • Size height

There are other parameters that may be useful, but I'll wait for more feedback (comment below) before adding them. Ideas:

  • Size unit (pixels, inches, etc.)
  • Actual width
  • Actual height

Immediate crash of v3 in Windows 7

Hi,
I just installed v3.0 and tried to use it.
Whenever I press the Reisize button, it immediately crashes with the
message Image resizer has stopped working...

Also, why does it takes such a long time before the Resizer's dialog window appears, after starting the tool from the Explorer context menu? I think this was the case for all version, and still is, which I do not understand.

MSIX package

Look into creating an APPX (Windows 10) package and publishing it in the store.

MSI's of recent builds?

Brice, pleased to see you are still working on this project. Are there MSI's of the latest stable and beta release?

Not working

Sorry if I missed something but using ImageResizer on Windows 10 for many months now without issue. Today software not working. Choose files, right click on resize, nothing happens. Deleted app, re-installed twice (no errors), still does not work.

Any ideas?
Thank you.
G

unfreeze the UI

May I suggest to add some "application.doevents" in the loop to help unfreeze explorer.exe UI when we ask to resize a lot of images.

Problema with beta

Hi,
The stable version worked fine; I'm now trying the beta but every time I start click on "resize" button I get the following error:

cattura

Note: "Impossibile trovare il file" means "Impossible to find the file"

Translations: spanish and basque

Hi!

I've just translated ImageResizer to spanish and basque using the POEditor. I hope they will be available soon.

Thanks for such a great project!

Reorder default sizes

Reordering the default sizes should be enabled. Ideally, you should be able to drag-and-drop them in the Advanced options.

Disable ignore orientation when Fit unselected

thought I should start a new thread instead of adding to the Beta Thread....

I installed the Beta as the Resizer is not calculating the resize here correctly , it was not in Ver.3 and is not with the Beta either , and the new Fill and Fit Option in the new Beta don't help with getting the true size.

For eg. my Main monitor is a BenQ BL3200 @ 2560x1440 and if I do a Custom Resize to that size , I get 1080x1440 with the Beta if I set Fill or Stretch instead of Fit I get 1440x1440

Like most I am on Windows 10 these days Version 1607.

Option to remove metadata

By stripping all but the essential metadata from the images, the resulting file size should be significantly smaller.

Command-line parameters

Image files and the output directory can already be specified, but allowing the size and other options to be specified would enable a lot of automation scenarios.

Author-owned Chocolatey package

I am the current maintainer of the Chocolatey package for this application. And it's moderately popular package!

https://chocolatey.org/packages/imageresizerapp

I am interested in transferring ownership and responsibility to the author. Author-owned packages can be given "trusted" status, which helps them move through moderation very quickly (in some cases, automatically).

I can transition a standalone repository containing just this package and instructions, like this one:

https://github.com/NickeManarin/ScreenToGif-Chocolatey

The package currently lives in my personal package repository:

https://github.com/AnthonyMastrean/chocolateypackages/tree/master/packages/imageresizer

Fit isn't an option

On the web site, there's a screen shot showing Fit. That's exactly what I'm trying to do - scale an image to fix within width/height, but I don't have Fit as a drop down option in Custom.

Light up WIC codecs

Installing a WIC codec should light-up in the following areas.

  • Resize pictures context menu
  • Open file dialog All picture files filter
  • Fallback encoder list

Delete picture

If you check the two last checkbox:

  • Replace original files
  • Ignore rotation

And that you try to resize a picture that is in one of the library folder (eg: Library/Images) the file is sent to the trash bin

Non-admin setup

Create a dual-purpose MSI to enable per-user installations.

Deploy through WMI?

Hi there,

Staff at a school I work with love Image Resizer, but they would like an easy way to deploy school-wide. Are there any parameters we can run on the installer for a remote, silent install at all please?

Thanks in advance,
Matt

Add a context menu icon

Hello everyone,

to make it short - I've just unsuccessfully searched for a way to simply add an icon to the right-click context menu entry in Win 10 for ImageResizer. I think it would be way easier to locate the entry that way.

I know you can add icons to custom context app links (I create myself for example), but the implementation here seems to be beyond my - let's call it scrutiny.

I simply couldn't locate any fitting shell extension entries in registry, so cannot simply add an icon link in there it seems?

Of course I'm happy for additional pointers to add an icon on my own with Win 10 (regedit etc) means.

Thought to raise it here - it's not a major "issue" per say, but maybe it's easy to implement for the future "nice to have" features.

Thanks for creating the app - made my life a lot easier a lot of times already.

Custom filename format

First of all, thanks for this great app and I'm glad you're working on it again.

Could you add a ability to choose between different filename suffix - let say not only filename (Size).extension but for example with underscore or dash - filename_size.extension.

I'm using it for quick resize for web projects and I need to rename it everytime.

Immediate Crash of v3.0 on Windows 7 after clicking the Resize button

v3.0 immedately crashes on my Windows 7 installation
when clicking the Resize button, with the message:
Image Resizer has stopped working...

Tried uninstalling it, then build it from source. The installer does not build, because it says it is incompatible with my version of Visual Studio, which is 2015 Community. The DLL and exe build correctly though, and can be run, but only in the Debug version. The Release version crashes as well.

Then, from another issue post here, I found out there is a v3.1 beta, which I installed, and seemed to work, but that was too quick a conclusion: It worked only because the dll from my VS build was still loaded. Once that one was removed, and I uninstalled/reinstalled everything, v3.1 did not even add the Resize Image option in the context menu, neither did v3.0 after that.

Update: I decided to rebuild it from source. See my message below.

Bug in the quiet installation

(from Rick)

I'm running this via:

ImageResizerSetup-3.0.exe /install /quiet /norestart

Which is fine as long as .NET isn't needed. When it is, it hangs on the .NET installer, waiting for user input. So I think a switch has been missed for this too?

Product website

It should include basic usage information and a download link.

It should also be referenced in the setup, README, About tab, etc.

Fit algorithm fails if only one dimension is specified

Version - 3.1-beta

The algorithm fails if the dimension specified is smaller than the other.

Example image: 1000x500
resize to: fit to 100x(auto)
expected output: 100x50
actual output: 100x50

Example image: 500x1000
resize to: fit to (auto)x100
expected output: 50x100
actual output: 1x1

Suggestion: Define max height/width

Instead of defining arbitrary values for height and width, we could set a MAX height and width.

This will help deal with horizontal and vertical images when batching processing them together.

Program crashes immediately

When I right-click and choose the resizer, I'm getting the generic "Image Resizer has stopped working" message. I'm using Windows 7 Pro 64-bit. I tried using the 3.0 release and the 3.1 beta. I rebooted between every step (install, uninstall, etc.) when trying both versions.

Localized setup

I'm sure it's possible to create a localized WiX Bundle...

About page

In the advanced settings dialog, there should be an about page showing the current version number.

Some Italian translations are a bit weird

I had a quick look at Resources.it.resx and some translation sound a bit strange.
I would suggest to change
"dimensione" for "size", instead of "misura"
"dimensioni" for "sizes", instead of "misure" (e.g. in Advanced_Sizes)

"Il valore deve essere compreso tra '{0}' e '{1}'.", instead of "Il valore deve essere tra '{0}' e '{1}'."

Reimage Sizer - Pics are all black

On a Windows 7 pc, every picture we resize come out totally black.

Someone else can resize the same pic and it works properly.

What could be the issue?

Strong changes in coloration

I have a picture with 591x591px (Example images below). I wanted to test the "make images smaller not larger" option and set the following:

  • Custom size: fit 1000x1000 px
    • Make pictures smaller not larger
    • Resize the original pictures
    • Ignore the orientation of pictures
  • JPEG Quality Level 100

I expected one of 2 things to happen:

  • Creation of an identical copy (as the picture didn't require resizing) with the new name (This would be great!)
  • Creation of a newly encoded copy that maybe shows some artefacts and slightly changed file size.

The latter happened (which is OK and can be expected). However, the colors are visibly changed now. The saturation appears reduced, maybe there was some automatic white balance. I assume this is a result of re-encoding the image. Other image resizing software didn't change the colors, so this might be due to some setting in the encoder or a bug.

Original:
suite01
Resized to same size:
suite01 custom

Suggestion: Option to allow filtering in other colorspaces

There is a paper by Burger called 'Color Space Considerations for
Linear Image Filtering' which basically points out that neither sRGB nor lineared sRGB space is an optimal choice for linear filtering and suggest the usage of CIELAB/CIELUV instead.
http://staff.fh-hagenberg.at/burger/publications/pdf/aapr2010.pdf

I'm currently running some experimentations using CIELAB/CIELUV for mipmap generation and storing texture data as CIELAB/CIELUV and convert to linearized sRGB inside a shader for real time rendering. I get slightly more appealing results for low resolution texture data with CIELAB/CIELUV compared to sRGB/linearized sRGB, but have the impression that this isn't the optimal choice and a modified lightness transfer function might yield better results in my case. Also CIELUV transformations seem to be a bit problematic.

However, my suggestion is that you adopt options to allow the selection of filtering to be performed inside sRGB, sRGB (linearized), CIELAB and CIELUV as I would love to give these magnitude of resizing filters a try in other colorspaces. :)

I found Bruce Lindblooms site invaluable when dealing with color space conversation http://www.brucelindbloom.com/

You might or not find my current (stubbern) color transformation code below useful, though beeing written in C++. Feel free to adopt it if you like.

class FColorFloat
{
public:
    // Variables.
    union
    {
        struct{FLOAT R,G,B,A;};
        struct{FLOAT X,Y,Z,_A;};
    };

    [...]
}

inline FColorFloat appSaturate( FColorFloat& Color, UBOOL Alpha=1 )
{
    return FColorFloat
    (
        Clamp(Color.R,0.f,1.f),
        Clamp(Color.G,0.f,1.f),
        Clamp(Color.B,0.f,1.f),
        Alpha ? Clamp(Color.A,0.f,1.f) : Color.A
    );
}

// Clamps value between 0 and 1 by scaling values above 1. LEAVES ALPHA CHANNEL UNTOUCHED.
inline FColorFloat appSaturateScale( FColorFloat& Color )
{
    //debugf( TEXT("appSaturateScale( %s )"), *Color.String() );
    FLOAT T = Max(Max(Color.R,Color.G),Max(Color.B,1.f));
    return FColorFloat
    (
        Max(0.f,Color.R)/T,
        Max(0.f,Color.G)/T,
        Max(0.f,Color.B)/T,
        Color.A
    );
}

/*-----------------------------------------------------------------------------
    Colorspace conversation routines.

    Adobe RGB (1998)
        http://www.adobe.com/digitalimag/adobergb.html

    Matrices:
        http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
-----------------------------------------------------------------------------*/

inline FColorFloat GammaCompress( FColorFloat& Color, FLOAT Gamma )
{
    FColorFloat Result; FLOAT Exp=1.f/Gamma;
    Result.R = appPow(Color.R,Exp);
    Result.G = appPow(Color.G,Exp);
    Result.B = appPow(Color.B,Exp);
    Result.A = Color.A;
    return Result;
}
inline FColorFloat GammaDecompress( FColorFloat& Color, FLOAT Gamma )
{
    FColorFloat Result;
    Result.R = appPow(Color.R,Gamma);
    Result.G = appPow(Color.G,Gamma);
    Result.B = appPow(Color.B,Gamma);
    Result.A = Color.A;;
    return Result;
}

//
// Piecewise gamma transfer functions for sRGB colorspace.
//
// https://www.w3.org/Graphics/Color/sRGB.html
// https://www.opengl.org/registry/specs/EXT/texture_sRGB.txt
//
// OpenGL Extension actually uses slightly modified step values,
// for the conversation which address the missmatch of the two 
// piecewise defined segments found in the W3 document.
//
// TODO:
//  * Verify if step value is on the correct side (minor importance)
//  * Check which values are used inside IEC 61966-2-1.
//
inline FColorFloat GammaCompress_sRGB( FColorFloat Color )
{
    FColorFloat Result;
    Result.R = Color.R<=0.0031308f ? 12.92f*Color.R : 1.055f*appPow(Color.R,0.41666f)-0.055f;
    Result.G = Color.G<=0.0031308f ? 12.92f*Color.G : 1.055f*appPow(Color.G,0.41666f)-0.055f;
    Result.B = Color.B<=0.0031308f ? 12.92f*Color.B : 1.055f*appPow(Color.B,0.41666f)-0.055f;
    Result.A = Color.A;
    return Result;
}
inline FColorFloat GammaDecompress_sRGB( FColorFloat Color )
{
    FColorFloat Result;
    Result.R = Color.R<=0.04045f ? Color.R/12.92f : appPow((Color.R+0.055f)/1.055f,2.4f);
    Result.G = Color.G<=0.04045f ? Color.G/12.92f : appPow((Color.G+0.055f)/1.055f,2.4f);
    Result.B = Color.B<=0.04045f ? Color.B/12.92f : appPow((Color.B+0.055f)/1.055f,2.4f);
    Result.A = Color.A;
    return Result;
}

// Converts Adobe RGB (1998) to CIE XYZ D65.
inline FColorFloat AdobeRGB_CIEXYZD65( FColorFloat Color )
{
    FVector GammaTransferred(appPow(Color.R,563.f/256.f),appPow(Color.G,563.f/256.f),appPow(Color.B,563.f/256.f));
    static FMatrix M = FMatrix
    (
        FPlane( 0.5767309f, 0.1855540f, 0.1881852f, 0.f ),
        FPlane( 0.2973769f, 0.6273491f, 0.0752741f, 0.f ),
        FPlane( 0.0270343f, 0.0706872f, 0.9911085f, 0.f ),
        FPlane( 0.0000000f, 0.0000000f, 0.0000000f, 1.f )
    );
    FPlane Result = M.TransformFVector( GammaTransferred );
    Result.A = Color.A;
    return *(FColorFloat*)&Result;
}

// Converts AppleRGB to CIE XYZ D65.
// I haven't found any real documentation about it yet,
// so take the implementation as an educated guess.
inline FColorFloat AppleRGB_CIEXYZD65( FColorFloat Color )
{
    //debugf( TEXT("AppleRGB_CIEXYZD65( %s )"), *Color.String() );
    FVector GammaTransferred(appPow(Color.R,1.8f),appPow(Color.G,1.8f),appPow(Color.B,1.8f));
    static FMatrix M = FMatrix
    (
        FPlane( 0.4497288f, 0.3162486f, 0.1844926f, 0.f ),
        FPlane( 0.2446525f, 0.6720283f, 0.0833192f, 0.f ),
        FPlane( 0.0251848f, 0.1411824f, 0.9224628f, 0.f ),
        FPlane( 0.0000000f, 0.0000000f, 0.0000000f, 1.f )
    );
    FPlane Result = M.TransformFVector( GammaTransferred );
    Result.A = Color.A;
    return *(FColorFloat*)&Result;
}

// Converts CIE XYZ D65 to sRGB.
inline FColorFloat CIEXYZD65_sRGB( FColorFloat Color )
{
    static FMatrix M = FMatrix
    (
        FPlane( +3.2404542f, -1.5371385f, -0.4985314f, 0.f ),
        FPlane( -0.9692660f, +1.8760108f, +0.0415560f, 0.f ),
        FPlane( +0.0556434f, -0.2040259f, +1.0572252f, 0.f ),
        FPlane(  0.0000000f,  0.0000000f,  0.0000000f, 1.f )
    );
    FPlane Result = M.TransformFVector( *(FVector*)&Color );
    Result.A = Color.A;
    //return GammaCompress_sRGB(appSaturate(*(FColorFloat*)&Result));
    return GammaCompress_sRGB(appSaturateScale(*(FColorFloat*)&Result));
}

// Converts CIE XYZ D65 to linearized sRGB space.
inline FColorFloat CIEXYZD65_RGB( FColorFloat Color )
{
    static FMatrix M = FMatrix
    (
        FPlane( +3.2404542f, -1.5371385f, -0.4985314f, 0.f ),
        FPlane( -0.9692660f, +1.8760108f, +0.0415560f, 0.f ),
        FPlane( +0.0556434f, -0.2040259f, +1.0572252f, 0.f ),
        FPlane(  0.0000000f,  0.0000000f,  0.0000000f, 1.f )
    );
    FPlane Result = M.TransformFVector( *(FVector*)&Color );
    Result.A = Color.A;
    //return *(FColorFloat*)&Result;
    //return appSaturate(*(FColorFloat*)&Result);
    return appSaturateScale(*(FColorFloat*)&Result); // Seems to yield a bit better results.
}

// Converts sRGB to CIE XYZ D65.
inline FColorFloat sRGB_CIEXYZD65( FColorFloat Color )
{
    FColorFloat GammaTransfered = GammaDecompress_sRGB(Color);
    static FMatrix M = FMatrix
    (
        FPlane( 0.4124564f, 0.3575761f, 0.1804375f, 0.f ),
        FPlane( 0.2126729f, 0.7151522f, 0.0721750f, 0.f ),
        FPlane( 0.0193339f, 0.1191920f, 0.9503041f, 0.f ),
        FPlane( 0.0000000f, 0.0000000f, 0.0000000f, 1.f )
    );
    FPlane Result = M.TransformFVector( *(FVector*)&GammaTransfered );
    Result.A = Color.A;
    return Result;
}

// Converts linearized sRGB space to CIE XYZ D65.
inline FColorFloat RGB_CIEXYZD65( FColorFloat Color )
{
    static FMatrix M = FMatrix
    (
        FPlane( 0.4124564f, 0.3575761f, 0.1804375f, 0.f ),
        FPlane( 0.2126729f, 0.7151522f, 0.0721750f, 0.f ),
        FPlane( 0.0193339f, 0.1191920f, 0.9503041f, 0.f ),
        FPlane( 0.0000000f, 0.0000000f, 0.0000000f, 1.f )
    );
    FPlane Result = M.TransformFVector( *(FVector*)&Color );
    Result.A = Color.A;
    return Result;
}

//
// D65 Standard illuminant.
//
// http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
//
#define D65_XYZ_X 0.95047f
#define D65_XYZ_Y 1.00000f
#define D65_XYZ_Z 1.08883f

//
// Epsilon and Kappa values used for CIELAB/CIELUV.
//
// http://www.brucelindbloom.com/LContinuity.html
//
#define CIELAB_EPSILON (216.f/24389.f)
#define CIELAB_KAPPA   (24389.f/27.f)
#define CIELUV_EPSILON (216.f/24389.f)
#define CIELUV_KAPPA   (24389.f/27.f)

//
// CIE XYZ (D65) -> CIE LAB (D65)
//
// http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html
//
inline FColorFloat CIEXYZD65_CIELABD65( FColorFloat Color )
{
    //debugf( TEXT("CIEXYZD65_CIELABD65( %s )"), *Color.String() );

    FLOAT xr = Color.X/D65_XYZ_X;
    FLOAT yr = Color.Y/D65_XYZ_Y;
    FLOAT zr = Color.Z/D65_XYZ_Z;

    FLOAT fx = xr > CIELAB_EPSILON ? appPow(xr,1.f/3.f) : (CIELAB_KAPPA*xr+16.f)/116.f;
    FLOAT fy = yr > CIELAB_EPSILON ? appPow(yr,1.f/3.f) : (CIELAB_KAPPA*yr+16.f)/116.f;
    FLOAT fz = zr > CIELAB_EPSILON ? appPow(zr,1.f/3.f) : (CIELAB_KAPPA*zr+16.f)/116.f;

    return FColorFloat
    (
        116.f*fy-16.f, // L.
        500.f*(fx-fy), // A.
        200.f*(fy-fz), // B.
        Color._A
    );
}

//
// CIE LAB (D65) -> CIE XYZ (D65)
//
// http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html
//
inline FColorFloat CIELABD65_CIEXYZD65( FColorFloat Color )
{
    //debugf( TEXT("CIELABD65_CIEXYZD65( %s )"), *Color.String() );

    FLOAT L = Color.X;
    FLOAT a = Color.Y;
    FLOAT b = Color.Z;

    FLOAT fy = (L+16.f)/116.f;
    FLOAT fx = a/500.f+fy;
    FLOAT fz = fy-b/200.f;

    FLOAT fx3 = fx*fx*fx;
    FLOAT fy3 = fy*fy*fy;
    FLOAT fz3 = fz*fz*fz;

    //FLOAT l  = (L+16.f)/116.f;
    //FLOAT l3 = l*l*l;

    FLOAT xr = fx3>CIELAB_EPSILON ? fx3 : (116.f*fx-16)/CIELAB_KAPPA;
    FLOAT yr = L>(CIELAB_KAPPA*CIELAB_EPSILON) ? fy3 : L/CIELAB_KAPPA;
    FLOAT zr = fz3>CIELAB_EPSILON ? fz3 : (116.f*fz-16)/CIELAB_KAPPA;

    return FColorFloat
    (
        xr*D65_XYZ_X,
        yr*D65_XYZ_Y,
        zr*D65_XYZ_Z,
        Color._A
    );
}

//
// CIE XYZ (D65) -> CIE LUV (D65)
//
// http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Luv.html
//
inline FColorFloat CIEXYZD65_CIELUVD65( FColorFloat Color )
{
    //debugf( TEXT("CIEXYZD65_CIELUVD65( %s )"), *Color.String() );

    //
    // If (Color.X+15.f*Color.Y+3.f*Color.Z)==0 we get divide by zero errors for udash/vdash.
    //
    // Finding a resonable CIELUV representation is however not trivial, and I should
    // probably check the spec on this. At least L should be 0 though.
    //
    FLOAT D = Color.X+15.f*Color.Y+3.f*Color.Z;
    //if ( D<=0.f )
    if ( D<=SMALL_NUMBER )
    {
        //debugf( TEXT("CIEXYZD65_CIELUVD65 Premature Result: %s"), *FColorFloat(0.f,0.f,0.f,Color._A).String() );
        return FColorFloat( 0.f, 0.f, 0.f, Color._A );
    }

    FLOAT yr = Color.Y/D65_XYZ_Y;

    //FLOAT udash = 4.f*Color.X/(D+SMALL_NUMBER); // HACK !!
    //FLOAT vdash = 9.f*Color.Y/(D+SMALL_NUMBER); // HACK !!
    FLOAT udash = 4.f*Color.X/D;
    FLOAT vdash = 9.f*Color.Y/D;

    FLOAT urdash = 4.f*D65_XYZ_X/(D65_XYZ_X+15.f*D65_XYZ_Y+3.f*D65_XYZ_Z);
    FLOAT vrdash = 9.f*D65_XYZ_Y/(D65_XYZ_X+15.f*D65_XYZ_Y+3.f*D65_XYZ_Z);

    FLOAT L = yr>CIELUV_EPSILON ? (116.f*appPow(yr,1.f/3.f)-16.f): CIELUV_KAPPA*yr;
    FLOAT u = 13.f*L*(udash-urdash);
    FLOAT v = 13.f*L*(vdash-vrdash);

    //debugf( TEXT("CIEXYZD65_CIELUVD65 Result: %s"), *FColorFloat(L,u,v,Color._A).String() );
    return FColorFloat( L, u, v, Color._A );
}

//
// CIE LUV (D65) -> CIE XYZ (D65)
//
// http://www.brucelindbloom.com/index.html?Eqn_Luv_to_XYZ.html
//
inline FColorFloat CIELUVD65_CIEXYZD65( FColorFloat Color )
{
    //debugf( TEXT("CIELUVD65_CIEXYZD65( %s )"), *Color.String() );

    FLOAT L = Color.X;
    FLOAT u = Color.Y;
    FLOAT v = Color.Z;

    //
    // If L==0 && (u==0 || v==0) we get divide by zero errors.
    // However L==0 is basically black, so just set (0,0,0,A) and be done. --han
  //
    // Fixme: Figure out a resonable and bullet proof way -- eventually.
    //
    //if ( L<=0.f )
    if ( L<=SMALL_NUMBER )
    {
        //debugf( TEXT("CIELUVD65_CIEXYZD65 Premature Result: %s"), *FColorFloat(0.f,0.f,0.f,Color._A).String() );
        return FColorFloat( 0.f, 0.f, 0.f, Color._A );
    }

    FLOAT l  = (L+16.f)/116.f;
    FLOAT l3 = l*l*l;
    FLOAT Y  = L>(CIELUV_KAPPA*CIELUV_EPSILON) ? l3 : L/CIELUV_KAPPA;

    FLOAT u0 = 4.f*D65_XYZ_X/(D65_XYZ_X+15.f*D65_XYZ_Y+3.f*D65_XYZ_Z);
    FLOAT v0 = 9.f*D65_XYZ_Y/(D65_XYZ_X+15.f*D65_XYZ_Y+3.f*D65_XYZ_Z);

    FLOAT a = (52.f*L/(u+13.f*L*u0)-1.f)/3.f; // DIV 0 !!
    //FLOAT a = (52.f*L/(u+13.f*L*u0+SMALL_NUMBER)-1.f)/3.f; // HACK !!
    FLOAT b = -5.f*Y;
    FLOAT c = -1.f/3.f;
    FLOAT d = Y*(39.f*L/(v+13.f*L*v0)-5.f); // DIV 0 !!
    //FLOAT d = Y*(39.f*L/(v+13.f*L*v0+SMALL_NUMBER)-5.f); // HACK !!

    FLOAT X = (d-b)/(a-c);
    FLOAT Z = X*a+b;

    //debugf( TEXT("CIELUVD65_CIEXYZD65 Result: %s"), *FColorFloat(L,u,v,Color._A).String() );
    return FColorFloat( X, Y, Z, Color._A );
}

// !! Optimize.
inline FColorFloat sRGB_CIELABD65( FColorFloat Color )
{
    return CIEXYZD65_CIELABD65(sRGB_CIEXYZD65(Color));
}
inline FColorFloat sRGB_CIELUVD65( FColorFloat Color )
{
    return CIEXYZD65_CIELUVD65(sRGB_CIEXYZD65(Color));
}
inline FColorFloat CIELABD65_sRGB( FColorFloat Color )
{
    return CIEXYZD65_sRGB(CIELABD65_CIEXYZD65(Color));
}
inline FColorFloat CIELUVD65_sRGB( FColorFloat Color )
{
    return CIEXYZD65_sRGB(CIELUVD65_CIEXYZD65(Color));
}
inline FColorFloat AdobeRGB_RGB( FColorFloat Color )
{
    return CIEXYZD65_RGB(AdobeRGB_CIEXYZD65(Color));
}
inline FColorFloat AdobeRGB_sRGB( FColorFloat Color )
{
    return CIEXYZD65_sRGB(AdobeRGB_CIEXYZD65(Color));
}
inline FColorFloat AdobeRGB_CIELABD65( FColorFloat Color )
{
    return CIEXYZD65_CIELABD65(AdobeRGB_CIEXYZD65(Color));
}
inline FColorFloat AdobeRGB_CIELUVD65( FColorFloat Color )
{
    return CIEXYZD65_CIELUVD65(AdobeRGB_CIEXYZD65(Color));
}
inline FColorFloat AppleRGB_RGB( FColorFloat Color )
{
    return CIEXYZD65_RGB(AppleRGB_CIEXYZD65(Color));
}
inline FColorFloat AppleRGB_sRGB( FColorFloat Color )
{
    return CIEXYZD65_sRGB(AppleRGB_CIEXYZD65(Color));
}
inline FColorFloat AppleRGB_CIELABD65( FColorFloat Color )
{
    return CIEXYZD65_CIELABD65(AppleRGB_CIEXYZD65(Color));
}
inline FColorFloat AppleRGB_CIELUVD65( FColorFloat Color )
{
    //debugf( TEXT("AppleRGB_CIELUVD65( %s )"), *Color.String() );
    return CIEXYZD65_CIELUVD65(AppleRGB_CIEXYZD65(Color));
}

Security Properties of files

Resizing strips away inherited security properties on files.

File properties should be retained as far as possible, and possibly without attempting recreate it.

Beta not yet working?

If v3.1.0-beta1 is not supposed to work yet, you can close the issue right away :)

I see the new advanced properties, however actually resizing fails with the following error dialog:

image

This is reproducable for me with different jpeg files as well as different settings ( target size, filename parameters, etc.)

The integer in the path containing Windows\system32 changes each time, the second path C:\p is always the same.

My Environment:

  • ImageResizer v3.1.0-beta1 (zip download from github releases)
  • Windows 8.1 Enterprise 64bit

Recent Win 10 update broke program

image
After my computer updated to the Creators Edition of Windows 10 recently the program just shows a white screen when I try and resize an imaage. Any help would be appreciated. Thanks

resizing finished with errors - too many meta data changed

Hello,

Image resizer is working well for most of my .jpeg files.
But on some files, Image Resizer is quitting with the following error:

resizing finished with Errors - to many meta data changed

Image Resizer Version: 3.0.4802.35565

imageresizer_error

Do you have any hint how to resolve this error?

Thank you and best regards,
Karl-Heinz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.