//Configure app to use NodeJS as the main scripting engine
//giving you the full power of Node directly in your app!
cfg.Node
//Configure for Material UI and light theme.
cfg.MUI, cfg.Light
//Make sure the required node modules are installed to ide.
//(This downloads modules from
https://www.npmjs.com).
ide.AddModule( "exif" )
//Called when application is started.
function OnStart()
{
//Set MUI primary color.
app.InitializeUIKit( MUI.colors.teal.teal, "Light" )
//Create a MUI card layout.
lay = MUI.CreateLayout("Linear", "VCenter,FillXY")
path = app.RealPath(app.GetAppPath())+'/Img/world.jpeg'
//alert(path)
uri = app.Path2Uri(path)
var ExifImage = require('exif').ExifImage
try {
new ExifImage({ image : path }, function (error, exifData) {
if (error)
alert('Error: '+error.message);
else
alert(JSON.stringify(exifData));
})
} catch (error) {
alert('Error: ' + error.message);
}
//Add main layout to app.
app.AddLayout(lay)
}
I tried this code, but an error came out
вторник, 10 мая 2022 г. в 18:20:00 UTC+3, GOOD: