Images flash upon loading - react-native

Description
Upon loading an image (gif/jpg/webp/png) the image flashes the background color then loads the image. I expect that the image would just load and only have a placeholder when the image takes a while to load.
This problem is irrelevant to the size of the image (img size 10kb). Even if the image loads immediately the background color flashes.
Reproduction
Essentially just load an image and replace it with another image on the same scene.
I have a git project with the issue where it flashes red:
https://github.com/dnam50/gifTry.git
A gif demonstrating https://user-images.githubusercontent.com/28775204/32446378-5eb5926e-c311-11e7-9afe-6c689a4280af.gif
Additional Information
Fresco version: [1.5.0]
Platform version: [nexus 6 api 25] but has been tried on numerous android devices.
I am aware of White Flash inbetween Re-rendering Image Views which is the same issue but I have added a code example and gif example.
Thanks

Related

How to disable anti-aliasing in the image using the Panalleum library

I have images loading with some issue. I am using Panalleum library to load the images.
If I zoom out and see the same image, there you would see some small dots creating lines. This is related to Anti-Aliasing.
How can I fix this blurriness or lines on the image?

How to capture snapshot of entire large ScrollView [Expo] [ReactNative]

I want to take a screenshot of a entire (large on height) ScrollView.
I'm using Expo.takeSnapshotAsync to take the screenshot, but the returned image is truncated (croped) on height, hiding some part of ScrollView content.
This behavior could observed on both platforms, ios and android, using expo sdk v25.0.0.
Any tip is welcome.
Thanks!

Why does iPad preview use wrong image?

My question is, why does the iPad preview use a different image than the storyboard for wRegular hAny?
I'm trying to set up a universal app with a menu that will use larger buttons for iPad. In the asset catalog, I've specified the standard image size for wAny x hAny, and loaded a larger image for wRegular x hAny.
The story board looks fine for all size classes, with the wRegular x hAny using the iPad image, and everything else using the iPhone image. But the previews all use the iPhone image, including the iPad preview, despite the storyboards showing the correct images. In the screen shots below, the story board is shown to the left, preview to the right.
Can someone tell me what I'm doing wrong here? I'm trying to avoid using explicit image sizes for each class - is that what I should be doing?
Any help would be greatly appreciated. I've read everything I can on using different image sizes, and still cannot figure this out.
enter code here
You can't have a different images by size class for the same button in Interface Builder. It looks to me like you set the image of the button to be the iPad one first in Regular/Any, then set the iPhone one afterward in Any/Any which changed what you did in Regular/Any.
In this image, see how the Font has a + symbol to the left of it, but Image doesn't? That's for specifying the value per size class. Since Image doesn't have that, it's not a value saved for the specific size class.

Titanium Images Wrong Size

I have a Titanium app where I am using the same ImageView for alot of different images. I am changing the image in the image view by setting it's image property.
The problem is some of the images are not showing at their full size sometimes, it is kinda random, but sometimes they show full size sometimes not.
I have width and height set to "auto" on the image view.
Anyone come across this issue.
A potentially more reliable way would be too dynamically resize the image before handing it off to the ImageView by using Titanium.Blob.imageAsReized.
Try to integrate this in your code, first you have to load the image as a blob though.
// Get the blob of your image first, then call this method
imageView.image = imageBlob.imageAsResized(newWidth, newHeight);

XAML event for background image rendered off screen

I am setting a background image on my XAML Grid with a Uri. The Uri points off to a HTTP url, where it will fetch, and then render the image as a background for a Win8 metro app.
I've been trying to figure out if there is an event or something I can hook into to let me know that WPF has loaded it into memory, AND finished rendering it out of view.
Currently, a small image will load fast enough, and smoothly fade in. However, if I load a larger, slower image, it will take 100s of ms to show up as the background, which means it either pops up mid-fade, or after the fade effect has completed. This looks quite poor.
The goal is to have a fade transition between app pages (I already have this), without the inconsistency of the background image popping up whenever it's done.
Any suggestions would be welcomed.
You don't say exactly how you're loading the image but there's a DownloadCompleted event on BitmapImage, e.g.
BitmapImage bmp = new BitmapImage(imageUri);
bmp.DownloadCompleted += ReadyToDisplay;
Like Phil said, but then for Windows Store apps:
BitmapImage bmp = new BitmapImage(imageUri);
bmp.ImageOpened += ReadyToDisplay;
ImageOpened Occurs when the image source is downloaded and decoded
with no failure. You can use this event to determine the size of an
image before rendering it.
source: MSDN