How to make image with watermark in flutter? - dart

I want to take photo in my flutter app to avoid inputting fake picture. So, I will make my app to Take photo and Save photo with current DateTime and Longitude, Latitude Watermark. Can anybody show me how can I achieve this?

The most straightforward library would be https://pub.dev/packages/image.
In the examples, it shows:
Create an image, draw some text, save it as a png
// Draw some text using 24pt arial font
drawString(image, arial_24, 0, 0, 'Hello World');
But there should be plenty of other image editors searched at https://pub.dev/flutter/packages?q=edit+image

Related

Downloaded Vaadin14 charts are at much much lower resolution than the charts that appear on user's screens

In Vaadin 14.4.2, I have a chart with the "chart menu" button on the right which allows users to download a chart into various formats (eg png, jpeg etc.). However, when I download the chart as a png, it gets "squished" badly. It does not look like the chart that appears on my user's screen. I would have thought that the resolution would have been at least as good as what a user sees on their own screen. Why does the Vaadin charts convert the resolution? Put another way, is there an easy way to just get the "download to png" to appear the same as what the users sees on his screen? (Worse case, I will just disable the "download to file" chart feature, since most users may know how to just take a screenshot of their screen, but I had hoped that the download feature would work since it would produce "perfect" quality charts etc.) Below is a screenshot of what my chart looks like, followed by what the downloaded png looks like.
And now here's the png: you can clearly see it doesn't look like the chart in the above screenshot. It's at a much much lower resolution for some reason.
Without seeing the code I would guess that the difference is in the witdh used.
If you haven't defined the Exporting.setPrintMaxWidth() to be as wide as the used width for the exported chart will be made to fit into typical paper format which is by default 780.

Is it possible to should be able to move the crop square in side a uiimagepickercontroller in camera

[1]: https://i.stack.imgur.com/NCMd0.jpg
In the above image how can i should be able to move the crop square, not the image.
enter image description here
My advice is to use the library for achieving this. Here you can find the list of libraries for image upload.
List

How to detect text area on image and save it to another image for preparing OCR in iOS?

I use GPUImage to convert image to Black&White, and then I use TesseractOCRiOS to scan text on that image, but output is not good result. So I want to detect text on image and save to another image with text only to prepare for OCR to have good result.

how to display image (containing text) with a good quality

I’m new in iOS and trying to make simple app with hierarchy of viewcontrollers. In the last one I wanna display scrollable image (which can also be zoomed at least x1,5), containing some small black and white picture and a piece of text. Initially I planned to make vector image, convert it to .jpg and use UIScrollView for displaying. But I found out that .jpg ( approx. 150 KB) didn’t provide a good quality for displaying text. As I have to use a lot of images I don’t want to increase image size. What is worse I also want it look good on retina display.
Can you recommend a way how to display image, containing text, with enough quality?
I mean that I don’t want the user see the separate pixels of letters in the text. Just like when you read text in your e-mail in iOS. Image size should be as small as possible. Planning physical size of image – approx. 5 cm x 15 cm.
Any help much appreciated
Thanks
To get good edges you would need to use png not jpg, which will make the image sizes much larger. I have a better suggestion, more code but better solution.
The answer is to not put the text into the image, but to draw it over it in real time.
You would:
associate text at some coordinate in the image (say a CGRect) with the image
create a uiimageview subclass that in the drawRect routine, after calling super, draws the text using the NSString categories on UIKit (which let you draw into a context)
To get going on this please create a small one vc project and get the subclass working there, then back port it to your primary project.

Get image Properties in iPhone to check image quality

I'm capturing an image from the iPhone camera and storing it in the document folder for further check and use.
Before storing the image i want to check the image quality based on the RGB value, grayscale and white balance , etc.
All that i can get from the image. But i am not able to understand what should or how should i use any framework that would help me retrieve this information.
Any help would be appreciated.
Thank you!
This app may do what you want. It is called Photo Metadata Reader. I saw it had RGB in the screenshots.
https://itunes.apple.com/us/app/photo-metadata-reader/id437865801?mt=8
If you want to retrieve metadata from UIImage - check this
https://github.com/foundry/UIImageMetadata
If you want to get, for example, color balance, I think you must get pixel data from image and compute this by yourself

Resources