Image Rendering problem - ipad

application is e-book reader, we are using svg format to render the pages ,the prob is while rendering the pages in ipad, images are getting rendered but they are taking time to get render,can any one please tell me to solve this issue ?
thank in advance..
prasad
cvvprasad.dingari#gmail.com

Rendering an image will always take time. With an e-book reader you have the advantage of knowing by-in-large that page views will be sequential. One idea is to render in the background while the user is viewing the previous page, and swapping which is on top when they change the page.

Related

gif not animating correctly in Microsoft edge

I am working with a loading gif on a website and it works correctly on all browsers except Microsoft edge. With edge, the gif runs all the way through the loading circle, but at what I assume is the last frame*, a sliver of the gif freezes and stays there as the gif continues to play through again. Once it happens one time, it will continue to happen until the user leaves the page. I can't put up a link to show the actual gif I am struggling with,
however I just created something quickly in paint.net and threw it into an online animation tool to show what it is doing.
https://giphy.com/gifs/QsUAu5ud4ibIdq97sm
So with this quick gif I just created, once that red mark shows up, it will show up every time after the initial load of the gif.
*I am just assuming it is the last frame but I can not access a copy of the gif before it was compiled into gif format so I don't know how much of the loading animation is in each frame
What I am asking is if anyone knows how to fix this issue when using edge. I am limited because I cannot change the gif itself in anyway or change
the frame rate of the gif. Any ideas are welcome because I am all out of ideas and have spent hours scrolling through
pages online looking for a solution and haven't come across anything close to what is happening here.
Also this is how the gif is being created on the page with the html. Not sure if this is helpful in this case or not:
<div style="text-align:center">
<img src="~/Content/images/GIF-loading.gif" id="loadingGif" />
</div>
I have tried to create a sample using your code and download a loading image from here, it seems that it works well on Microsoft Edge 44 and Edge 42, the result like this. So, I think you could try to download a new loading image and retest it on your side.

PDF.js : How to stop PDF turns into 180 Degree when using page navigation

I want to use PDF.js for loading PDF into viewer. While loading and navigating pdf pages. It gets turn into 180 Degree.
For example see this video : https://youtu.be/4w0276IFv58
For example see this demo : http://testchat32.tk/PDF/
You can get all files used in page source.
Any suggestion or solution much appriciated.
Thanks in advance.

Is it possible to take an image from a UIWebView and display it natively without reloading?

Say I load a webpage with an image on it. Is there a way to reuse this loaded image within a UIImageView without reloading the image from a url?
If the image is cached by URL loading system, it will come from the cache when you try to load it.
Sorry I can't give a large explanation as im on y phone but I feel like what your looking for is 'core data store' there are several examples of how to use this framework, but it's quite complicated and has a large learning curve with ios development.
Also you say 'a' uiwebview. Does that mean that the URL your accessing to show within your uiwebview is static? If so, just copy and save the image and store the image in your project for future reference.
Or are you allowing the user to keep swapping through links in the uiwebview and store all those images that popup on the web page?
Sorry I'm just unclear with the question... Please no down votes :)

UICollectionView paging breaks after 2^24 pixels

The setup
I have a UICollectionView that allows the user to page through pictures, 12 to a page. There are upwards of 200,000 pictures that should all be available in the app. I'm not expecting a user to scroll to page 20,000, so there's function to jump to a certain page.
The problem
In landscape orientation, paging breaks down on page 16,385. The collection no longer adjusts to the page boundary. If you go back before page 16,384, you can get it to start working again, but no page past 16,385 works.
My delegate also stops getting scrollViewDidEndDecelerating: the message when the bug shows up.
The hypothesis
Page 16,385 in landscape orientation happens to start at pixel 16,777,216 which happens to be 2^24. I think that there's something in UICollectionView or UIScrollView that breaks past 2^24.
Is this just an undocumented limit? Am I out of luck?
The example
I've uploaded a project that demonstrates the problem. Here's the relevant view controller. If you shake your iPad or the simulator, you'll be taken to page 16,384, one page before the bug shows up.
The snark
If you don't think a user should need to be able to go to page 20,000, that's cool. I don't think it's relevant to the question.
I'd say this is an undocumented limitation and would file a Radar bug report, attaching the sample project as evidence. If you are looking for an alternative method, you could try using a UIPageViewController with a collection view for each page. You can choose the swiping animation, rather than the default iBooks-esque animation, and replicate your sample project very closely.
You could just load say 10,000 pages and when the user jumps, load an appropriately different 10,000 pages.
I wonder whether you've tried using multiple sections? Is the limitation per section or for the entire CV?

Lightbox popup loading slowly in rails

I am using the lightbox plugin to show popups in my app.
Some popup's consist of multiple images.
So when a popup loads it shows images one by one.
My question is how can i load all images and show them at once.
It might help if you were a bit more specific as to what javascript framework you're using, exactly what plugin you're using (a link to it, for example), etc etc.
To answer your question, if you loading a lot of images, yes that's going to be slow. You can try spriting them into one image or you can change your view so that you're only loading one image at a time.
You could also designate a single server for serving assets and store your images there. That could speed things up some.

Resources