ImageResizer White Space Trimmer Crop Out of Bounds - imageresizer

We are using the WhiteSpaceTrimmer plugin to try and automatically trim down whitespace when it exists and add back some padding with the trim.percentpadding parameter. We are running all images through the white space trimmer, since we don't dynamically know if it exists or not.
We are running into an issue with some images and getting a "Crop rectangle is outside the bounds of the image" exception message.
Here is an example: https://imageresizer.furnituredealer.net/img/remote/images.furnituredealer.net/img/products%2Fsignature_design_by_ashley%2Fcolor%2Flamps%20-%20contemporary_l117914-b0.jpg?trim.threshold=50&trim.percentpadding=2
It seems we get this error only on portrait aspect ratio images.
I'm curious if there is something with our parameters wrong for portrait images, or something else we're missing. Or something else under the hood that we are not accounting for since we aren't calling any explicit crop.

This is a bug in ImageResizer; it has been reproduced and fixed.
https://github.com/imazen/resizer/issues/215
Updated binaries are available in the nightly feed, but it will be on NuGet.org in the next few days.

Related

Strange excess on shape when trimming or diving shapes

I'm using Illustrator 25.2.2 and have stumbled on an odd issue when I either use trim or divide on certain shapes. It adds a kind of stroke at certain nodes, see below screen shot. I'm not sure how or why this is produced, and keen to now if anyone else has had a similar issue. Shape is one the left and zoomed in portion of issue is one the right.
Try to toggle CPU/GPU preview (Command-E). Sometimes it's just a glitch with GPU preview.

Why is my Minecraft modpack flashing every color when I launch it?

Every time I launch my Minecraft modpack, this happens:
I can't think of anything to try to fix this
It is supposed to just start up like a normal Minecraft game, but as you can see, it doesn't
If I'd had to hazard a guess, it seems as if a mod is using a renderer and binding/unbinding the texture map.
If you scroll through the frames in the video you posted with . and , you see that it's every second frame that has the odd texture
No artifacts one frame
artifacts the other frame
The mod that might be causing this is a mod that tries to impose an overlay as a type of advertisment for it's own awesomeness, which fails on your system due to either the combination of mods, or there are multiple mods that try the same trick.
I don't particulary know this mod or that logo, but check your mod list if there's a mod that has the similar behavior, and field a bug report to the mod author, or check if there's a setting to disable the logo displaying.
My theory is that it might be a simple case that the mod forgets to rebind the original texturemap that's needed for the rendering of the guis, which causes the render cycle that follows to glitch out due to texture coordinates being remapped on another texture. The next render cycle everything is rebound again, and then it happens from the start again
It was optifine that was causing the problem

Render texture and normalized view rect in Unity

I'm using Unity 3D 3.5 pro.
I've got this scene with two cameras in it. One of them is looking at a plane that has a render texture on it. The other is recording the render texture. When the camera that's recording the render texture has a 1:1 normalized view and height rect, everything is fine. But when It's something different, some weird stuff happens -- the render texture's image becomes distorted. I've tried releasing and discarding the render texture's contents in an update function, but nothing changes! It's totally stopping the project I'm working on from being completed. I have pictures here to explain the situation in detail. The reason its a problem is because i need to be able to place non rectangular objects in front of the square and not have their scales appear to be distorted, due to the scale of the plane on which the render texture is being shown not being a square. What could I be doing wrong?
I also placed a similar question on unity answers, but received no usable help there. Here was the thread:
http://answers.unity3d.com/questions/389094/rendertexture-normalized-view-rect.html
I figured it out. I needed to mess with the offset and tiling of the rendertexture. Silly rabbit!

How to get crisp image for search result suggestion in Windows 8?

I'm using a 40 x 40 sized image as a search result suggestion image in Windows 8 search. Only advice about the image format I can find is to have correct size for it (http://msdn.microsoft.com/en-us/library/windows/apps/Hh700542.aspx: "Windows will scale or crop smaller or larger images").
However, the correctly sized image blurs annoyingly. The same thing happens whether I use jpg or png. Original image looks fine, but the result suggestion in the search charm is very ugly, being still of same size! Is Windows converting the image somehow, and how could I get the image to stay crisp?
I haven't noticed blurring with photo-like images, but this image contains clear lines and areas which are vulnerable to any scaling etc.
Update Sep 24:
Here is the test image I used when trying to figure out the problem. I also created different scale versions, but in my case the 100% version was used (that's why the "100" marking) - as I supposed because the resulting image really is 40x40. As you can see, the resulting image (right) is of same size as original (left), but blurry.
it does not happen that often but it seems the right solution in this case was simply to wait ;) I haven't done anything new regarding result suggestion images in my solution and today I realized that the images became crisp. Probably fixed by any of the windows updates.
[Took a stab at answering what seems the related question mentioned in the comments, so I'm posting here as well.]
It sounds like this could be related to automatic scaling of the images. Windows will automatically scale up/down based on pixel density, and you can help things scale well by either using vector-based images or, for bitmap images, supplying scale-specific versions.
For example, to scale an image referenced in markup as "AppLogo.jpg", you'd include these images:
AppLogo.scale-100.jpg
AppLogo.scale-140.jpg
AppLogo.scale-180.jpg
You can also use folders, e.g. "\scale-140\AppLogo.jpg".
For search result images, the 100% image is the 40x40 pixel version, 140 is 56x56, and 180 is 72x72. Just reference the image as "AppLogo.jpg" and the appropriate version will be used automatically. (You can also detect scale with DisplayProperties.ResolutionScale and manually choose an image.)
Here's a couple of articles with more examples/details:
"Guidelines for scaling to pixel density"
"Quickstart: Using file or image resources"
There's also some scaling discussion in the forums (general, not specific to search) here and here.

Removing the image from an IKImageView

I have an IKImageView that is coming up effectively un-initialized. This is happening effectively in an error-state (The user is unregistered) so I haven't had a chance to put an image in it yet.
In 10.6, this comes up fine, with a black rectangle. In 10.5, however, it comes up with garbage. some rectangles of noise, some rectangles of copies of the desktop, etc. I've tried setting the ZoomFactor to 0.0, I've tried setting the image to nil, but it appears that the problem is beyond that.
any ideas? (My next kludge is going to be to ship tiny blank image with the app, and try to get it to load that... but that's kind of silly)
Designing your product such that this view is not displayed when it has no content to display would be the most obvious course of action.