Maybe someone could help me with the code how to handle the situation when the user takes a picture for a registration with the phone in Horizontal or vertical position. The photo ID needs to be 90º right or 90º left, to be correct presented.
Thanks, Mario
I found this but how to write it correctly?
class CheckRotation {
/**
@param {string} src
@returns {Promise.}
*/
orientation(src) {
img = new Image();
img.src = src;
var width = img.width;
var height = img.height;
height = height + height // Double the height to get best
//height = height + (height / 2) // Increase height by 50%
Thanks for your answer / question. I need some help to develop a simple service to rotate a landscape picture of a registration inside Backendless. Any idea or suggestion are welcome because I’m using Codeless and enter in JS is something outside of my knowledge but I’m learning.
your code on the screenshot looks good, but red highlighting of 29-d line means that there is some problem with this file. When you open this file, do you see any error message below the code or when hovering the mouse over the 29-d line? That would help us to identify the problem and help you to resolve it. Also, did you installimage-js module before?
Yes I’m agree with you. If someone can post a sample code in nodejs I will put all together in Backendless. Should be a resize image example around, I couldn’t find it yet, how to do it inside Backendless…
As a part of support we provide, we cannot write code for you, this is what our consulting services team does.
When you develop your own code with nodejs, to do it with backendless is nothing special about it - just plan JS class that has the functionality. You should start with a quick start guide to develop the most basic node API service, it is already described in our docs: https://backendless.com/docs/bl-js/bl_advanced_quick_start_setup.html
Once it is done, you will have a feel for how nodejs API services work in backendless and after that you can do something specific for your app.