How to extract metadata from an image - codenameone

I'm a newbie to codenameone. I'm trying to develop some image-processing app. I need to know if the image has geotagging information and eventually extract those. Is there a way to do that in CodenameOne?
I'm aware of the methods based on plain javax.imageio packages, but I know that those are not available in codenameone.
Thanks for any hints!

We don't have such an API as it's pretty different between Android/iOS. You can write something like this in pure Java and parse the image header which should be relatively simple.
Or you can build a cn1lib on top of native code e.g. see this library, It does that for video which is arguably harder.

Related

Build a feature to get feedback on annotations drawn on pdf using adobe embed

I have some predefined annotations that I'm drawing on the PDF using the addAnnotationsInPDF function.
Users are not allowed to make their own annotations. Now I want to build a feature to get feedback on annotations drawn. I'm using Adobe embed API and showing PDF in Sized Container mode.
Please help me with what thing I can use to get this feedback.
This is not something that Embed itself can do, but can be built with front-end code. In order to help, you will need to narrow down your question quite a bit.

can i scale a react component like an SVG

i have a website where i had a pdf preview as a react component, the pdf should be in real dimension, all works smooth until I start working on making the website responsive, I didn't know wt to do exactly with the pdf preview, I have an idea to scale the whole component up and down like we do with an SVG but idk if that's possible to do
I think you better use a library to preview the PDF.Since you want to make it responsive without affecting the preview.You may make use of libraries like react-pdf. This library may generate PDF files from a URL, a local file within the project, or a base64 encoded version.
And i found this article useful.
Hope this may help you!
And as you have mentioned you have some troubles installing react-pdf it's not very compatible with webpack5that is mostly due to Buffer dependency.
Refer to thsi :react-pdf issues
Without knowing the exact error, it's so difficult to help, so be more specific when you are asking questions.

Pdf download in React.js project

I am building my project in React.js where I have added several graphs and I want to download the Graph data in PDF format on click of a button. With graph data I would also want to have graph images, but this is my secondary requirement.
Can anyone help me with this.
Thank you in advance.
There are a couple of ways that you could approach this, the easier way I think is you could do it on the client side using a library such as html2pdf. The other way is you could do it on the backend using a server side library. I recently did something similar and I ended up doing it on the client side using this library https://ekoopmans.github.io/html2pdf.js/ and it was pretty easy to implement.

Flutter Application localization approaches

This article shows 2 approaches for implementing the localization for Flutter apps
https://flutter.io/docs/development/accessibility-and-localization/internationalization
One is using creating files for the l10n and other is simple and direct.
I see that the l10n with the intl dependency is little bit complicated and frustrating for creating files for each lang and 2 terminal commands
and if I need to add a new term I have to go through the commands and files creations.
But anyway both work.
Is one is better than the other?
The variant using the intl package makes it easy to work with translate https://translate.google.com/toolkit.
If you want to use the same code for a web client tree-shaking will work better with this approach for smaller download sizes. I don't think this makes much difference in Flutter.
The downside as you mentioned is, that it needs more boilerplate to get going.

Do I need a localization framework for a small PWA in React?

I'm working on a small web application in React and I want it to be in two languages. I've seen several localization libraries like react-i18next and react-intl but I'm hesitant to install something maybe too big for such a simple application. Is there a lightweight library to do simple localization or should I look into a more straightforward approach like a string replacing component?
Thanks!
If it is a small project you probably do not need it.
However, it would be a really good experience to write your own localization component, integrate it with redux and opensource it.
Also, there are some simplified versions already available so you can reuse it and/or contribute into.
Here is a simple react-localization implementation.

Resources