Skip to content

Conversation

darienreese
Copy link

This adds a new parameter which only applies the resize downward when the image width or height is larger than the specified maxSize.

This contains an implementation for both the direct and imagick image manipulators.

This also disallows size and maxSize from being used together.

floorp_y8xnGcS7Jj.mp4

@randomouscrap98
Copy link
Owner

Your pull is changing the solution to require vs 17. Is there a reason for that? It also changes the ID of the projects in the solution.

Also, I'm not sure if I like this implementation, I have to think about it. It might be more consistent with the rest of the design to make this a boolean flag, like how crop works. Crop changes the meaning of size; this could do the same. Furthermore, images set with "maxsize" will need to be stored separately from images set with "size", as a 100 thumbnail set with "size" will have a different meaning than one set with "maxsize", but here they are named the same. So if a client loads your image first with size=100, then you try to load it with maxsize=100, yours will still return the size=100 version because theirs ran first.

@darienreese
Copy link
Author

The solution file was changed so that it would load contentapi.data in the solution when using Visual Studio.

Also, when adding the maxSize, I did add another flag in the thumbnail name similar to size, crop, etc that marks the file with "m{maxSize}". I agree that it could be a Boolean parameter like crop, but I'm not sure what a suitable name would be. Something like "dontUpscale" perhaps?

@randomouscrap98
Copy link
Owner

oh shoot how did I miss that, I'm sorry.

I don't quite understand the solution file thing but I don't understand a lot of what Microsoft does lol. I'll just try to open it on my side and see if it's fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants