Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to find the image width and height? #11

Open
RenugaDevi opened this issue Mar 14, 2012 · 1 comment
Open

How to find the image width and height? #11

RenugaDevi opened this issue Mar 14, 2012 · 1 comment

Comments

@RenugaDevi
Copy link

I found another problem that is, i'm using the code

[NSString stringWithFormat:@"addCSSRule('img', 'max-width: %fpx; height: %fpx;')", self.webView.frame.size.width_0.75,self.webView.frame.size.height_0.75];
[webView stringByEvaluatingJavaScriptFromString:setImageRule];

to avoid image getting cut. Now image getting cut problem is solved. But the only problem is, if the image is too small(400*200) means image getting stretch(with that code). Please guide me to solve that.

I'm really struggle with this problem..How can i check the image size based on that i will try to change this code

[NSStringstringWithFormat:@"addCSSRule('img', 'max-width: %fpx; height: %fpx;')", self.webView.frame.size.width_0.75,self.webView.frame.size.height_0.75]; [webViewstringByEvaluatingJavaScriptFromString:setImageRule];

for set webView width and height...

There are different size of images. so only it's getting stretch or shrink when aligning the image to fit in a webview.

Now i need to find image width and height which is used in picture book(.ePub) . Then only i can able to fit the image with original size of image in webview.

Please anyone guide me to do this

Thank you

@RenugaDevi
Copy link
Author

Anyone help me to solve my issue. I don't know how and where to start work.

please give me any ideas to find out image width and height which is used in .epub picture book.

I'm expecting your valuable guidance in this regard..

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant