Assume I have two png pictures and I want to make a third one by overlapping them (like a watermark effect), and save the result on the disk. Are there some libraries for react-native to implement this?
Yes. You can use react-native-view-shot https://github.com/gre/react-native-view-shot . This is mainly for taking a screenshot of the view. The Layouting and overlapping can be done in react-native. If you need blurring etc, you need to make use other libraries such as react-native-blur etc
Related
So, I don't believe that exists someway to "read" a PNG through its binary code, or something like that, but I have zero knowledge on Image Processing or Computer Vision, and so, I can't be sure if that are ways to do it or not.
To be clear: I want to know if there are ways to identify the image of a Logo using an image of the Logo as reference but through methods that use only the binary of the image.
Thanks in advance
If the logo is known, and not distorted a lot (logo printed on a scarf is not as good as on a flat surface), there is technologies that can achieve that:
It is a template matching problem, see https://docs.opencv.org/4.5.2/d4/dc6/tutorial_py_template_matching.html.
I want to show a scroll view that has fairly large number of thumbnails. eg: https://cdn.vox-cdn.com/thumbor/sddJ5KHoGDbZfx8jcNey4iahmu0=/0x0:1395x1171/1200x800/filters:focal(587x475:809x697)/cdn.vox-cdn.com/uploads/chorus_image/image/57064313/Screen_Shot_2015-09-07_at_9.11.34_AM.0.0.png
I want to load the view as fast as possible without delaying it until all images are loaded. This essentially means I need to lazy load image content. While each image is downloaded, a placeholder image (fetched locally) should be shown. I certainly know how to do this from scratch, but wanted to know if there are standard solutions available. Can I setup Xamarin.Forms.Image class to get this behavior?
Is there any particular reason for which you want to use a ScrollView specifically ?
From what you're describing, it looks like you should actually be working with a ListView instead (which will improve performance by a LOT if you have a large list of images).
Then, like #SushiHangover said, there is FFImageLoading that can help you work with these images, or you can create you own Image class, to implement a custom solution on both android and iOS.
Glide is a faily easy to use solution for Android, and SDWebImage is also a good solution for iOS.
I'm trying to put together a complication for my app, I'd like to have it potentially display different images depending on the content of the complication entry but am not sure how best to handle this.
I've got a complication group added to my watch extensions asset catalogue but it only seems to have slots for a single icon in multiple versions, for complication family and device size. I'm presuming this one that is linked to my watch's complication group is only for use by placeholder content, but then as you construct this template yourself I'm not sure why it has this project setting association with a group.
As I would like to add around 10-15 icons to choose from do I need to add multiple complication image sets to my watch app assets? Last years WWDC video on creating complications was early and had them working with images directly instead of image sets, but for the different watch sizes etc I'm presuming image sets are the preferred way to go about this.
Thanks for your help in advance, cheers!
At the moment it seems I'm able to work with normal images that are shared in my app between my iOS app, today widget and watch app. They work ok at the moment, but I'm not sure if they're the right way to go about it as they're definitely not the right size for complications being 30,60, and 90 pixels depending on the scale they're targeting. Still not entirely sure what the complication set is for in the assets as they don't seem to match the image size outlined in the apple guidelines for complications
I would like to loop through a sequence of images. I have tried using a Pivot control, but I don't like the blank space in between image transitions. I would prefer to use something that will animate between images smoothly. I also looked at the LoopingSelector control, but I can't seem to set the orientation to horizontal.
I'm assuming you're interested in a kind of image viewer like iOS offers, swiping right or left to navigate through the photos. If that's the case, I hate to say it but i think you're looking at building your own control.
I think to implement it properly these are the essential things you need to think about and address:
For performance' sake, load all the images you have into memorystream objects and store the binary data (you can get creative with this and only store the first 10-15 images, depending on how large the images are, doing this would enable your control to support thousands of images and still perform like a champ).
Once an image is about to be on-screen set the source of the image to the saved memorystream object that has the bytes loaded into it (this will minimize the work that the UI thread does, keeping the control performant and responsive)
Use Manipulation events to track the delta x of the motion someone uses when swiping left to right in order to actually perform the moving of the items
Move the images by changing their Canvas.Left property (you can go negative I think, otherwise just make your canvas the width of all the images you have combined)
Look up some of the available libraries to support momentum so you can have a natural smooth transition between images
I don't know anything about either library but I have to choose one of them.
Which one whould you recommend?
I'm using Perl. I need to generate images for weather site. The image is generated for a location and should contain temperature and a weather condition image inside. I guess this is a piece of cake for both libs. But I want to know which one is more powerful. I've read that libGD is not able to rotate text. Maybe there are some other drawbacks? Which one generates images faster? Whose API is easier to use?
according to this source, you should use GD:
GD and other modules built on top of that (like GD::Graph) are more aimed at producing "new" images like charts.
And you can read "Develop your own weather maps and alerts with Perl and GD", which is what you're looking for.
If you some some time. try them both, play a little, and decide.
I find both to be straightforward to use ImageMagick gives you a lot more power than gd. Here are two Magick examples from my posts:
How can I use IO::Scalar with Image::Magick::Read()
How can I resize an image to fit area with Image::Magick?
to give you examples of the API.
I have used GD to create a visualization.
See Script : giss-timeline-graphs.pl on that page.
imagemagick is more robust, however libGD should be able to cover most of the image generation tasks as well. you should see perl API/functions to both of these libraries to see what is more convenient for you.