Closed alexjeffburke closed 6 years ago
Hah, so a little after I open an issue I end up with something that passes all the tests.
I think the logic could use some review but I have opened a PR for it: https://github.com/papandreou/express-processimage/pull/55
Oh, I didn't realize you were still working on this :(
In the mean time I also came up with a fix, published in 8.0.2. Could you see if that works?
Oh no worries, I thought I'd fiddle with it one last time though I still wouldn't say I was totally confident with what I did. I can't see the fix on master but I'll try the new package next time I sit win it. Also, thanks for looking at it! :)
Ah crap, also I'm sorry about the mix-up with my email addy - that was supposed to be a personal contribution done in own time. Will make sure that doesn't occur again.
What’s that about the email address? This project doesn’t have a policy that prohibits company contributions, so no worries 😂
Ah, forgot to push, should be there now :)
Hi,
I stumbled on a case that is not correctly falling back from sharp to gm - failing test is here.
What seems to be happening is the second 'embed' argument causes the first setFormat=gif to be incorrectly attempted on a sharp instance which fails. The test can be made to pass by changing the
||
at https://github.com/papandreou/express-processimage/blob/master/lib/getFilterInfosAndTargetContentTypeFromQueryString.js#L512 to an&&
, but that causes other defaulting to go awry and other tests break.I've tried a good few other things, and I can get it close but there's aways something that breaks. My gut says the right solution might actually be to bite the bullet and attach the correct engineName to each operation, which would also pave the way to mixing and matching filters - but that's a much larger change. Opening an issue as the defaulting logic is a little fragile and my attempt to be minimal haven't succeeded so far so I can probably do with some pointers.
Let me know what else I can provide.