How to take a 300 DPI screenshot of a web page [closed] - printing

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Ok, dumb question, the images on the page are all 72, so you can't have 300. But... what's the best way to print in as high resolution as possible on a brochure?

How about zooming in on the web-page before taking the screen-shot? Most modern browsers allow you to set a custom zoom level.
Note though that the images may not look as great as you would like. You can't do much about this without access to high-res version of the images.

If the browser re-renders for print, and a CSS compliant one should (to respect print display specific rules), then it should be rendering to the resolution of the output device.
If you can then output to raw postscript or a high res PDF, perhaps you'd be able to get these high quality printable parts via that route.

I don't think you can get a high resolution print from a generic web page keeping the layout perfectly right (so, if your objective is to illustrate how it looks on screen but with print quality, this should be a showstopper).
Even if the text and many elements are a kind of vectorial (scalable) graphic (i.e. in theory you could zoom the page so they are rendered bigger and enlarge the browser window to get an enlarged screenshot), many graphic elements ("normal" images) are raster graphic, that cannot be enlarged without ugly artifacts coming out.
Moreover, many layouts use pixels for sizes of various elements (which means that scaling things up and down may make the layout become a mess).

Print to PDF. You can't increase the resolution of the images period without shrinking them. The text will be vectors and therefore will scale to any resolution.

I think the best way is to use Photoshop or any other imaging software which supports different resolutions. After grabbing the screenshot, create a new file in your imaging software then change the resolution to 300. Last step is to paste the image from clipboard.
This way won't increase the actual resolution of the image on print but the quality of print is actually higher. I checked this way and it works for me.

Related

loading smaller image in mobile device(small screen) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Recently i have seem articles that mention about it is advisable to load smaller size image in mobile device when using responsive web design.
Let say i have a product image that is uploaded by client(high definition image). What approach can i use to load this image of smaller size into the client side browser(other than create a duplicate of image of smaller size). Or the way that most developer did is to create a duplicate image of smaller size?
Maybe we can do it in server side to reduce the image size before user load the image? but will this affect server performance?
Ideally you should resize the image when it is uploaded and store the different versions on the server. Then when clients request your website from different browsers you would adjust and select the proper image to be included. You would also avoid the CPU intensive dynamic image resize on each request.

When to use double size images

I was thinking to write some quiz app where questions are represented as images.
My question is, for each quiz question (question.jpg), and thus a jpg file, do I have to create
a double sized question#2x.jpg file?
Is it necessary?
Doing this seems will increase size of my program so I was thinking when/if this is necessary to do?
PS. And in case I have to do it, I will just have to double in size each image manually and add to the project right (both original and double sized image)?
PPS. Just to add more info. The questions are located on the web site, I have to download them and add to my project manually (like resources). On web site there are no different versions of the same image. So, I have whatever is on the web site. Some images I noticed are 800x600 in dimensions but some are also in dimentions 500x400. So after I download these images, how shall I name them? Just with original names? and forget about the #2x extension? What's the best practice?
(if this will help my image view will probably be smth .like 310 in width). Do I have to modify them in size? What to do?
Apple's naming conventions of high resolution images can be found here:
Apple doc naming conventions
If you are developing in the way that you want to support old screen as well as retina screens. You can use xxxx.jpg for old devices as iPhone 3gs and iPad 1, and use xxxx#2x.jpg for retina displays. Where the aspect ratio needs to be the same but the #2x image needs to be twice as big.
In your case "my image view will probably be smth .like 310 in width", then the #2x image needs to be 620px in width and normal revolution 310px.
There is actually no need to have both image sizes in the app as you can use the same image and just scale it(If you really really need to have the old resolution supported).
Even if you add just a #2x, it will scale itself if someone on an old device installs your app. It may become a bit blurry but will still be quite ok.
If you are planning to use a lot of images in your app I suggest using some sort of web service where the user can download content that is to be shown. But that's just me. As the app will quite quickly become very large as images takes up quite a bit of space. Of course this all comes down to how many images you will have.
The drawback of using a web service is that the user much have an internet connection to be able to play. And download your content.(Most quiz apps I know of does use a web service for this.) This is a matter of taste.
If you do need to support normal and #2x here us a method you can use. This method will return the scaled image so you just need the normal one or the #2x one and then scale to the other size. This will at least help you a bit when it comes to getting either your app size down or your clients download time down.
If you are using .jpg's and scaling them upwards you can quite easily get a pixalated image as it is a lossy format. But if that's what you still want to do and maintain aspect ratio, this is one way to do it:
-(UIImage*)resizeImage: (UIImage *)imageToScale withScale:(CGFloat)theScale{
UIImage *image = [UIImage imageWithCGImage:[imageToScale CGImage]
scale:(imageToScale.scale * theScale)
orientation:(imageToScale.imageOrientation)];
return image;
}
Usage
[self resizeImage:[UIImage imageNamed:#"question.jpg"] withScale:0.5];
0.5 would double the size and 2.0 results in an image half the size as the original.
If you want a more complex method to set for instance set a specific target size just say so and I'll edit this answer.

Capturing image at higher resolution in iOS

Currently i am working on an image app where i am able to capture an image by using AVFoundation framework. But what i am looking is , to capture an image with certain resolution and DPI (may be 300 DPI or greater).
How to do this ?
There have been numerous posts on here about trying to do OCR on camera generated images. The problem is not that the resolution is too low, but that its too high. I cannot find a link right now, but there was a question a year or so ago where in the end, if the image size was reduced by a factor of four or so, the OCR engine worked better. If you examine the image in Preview, what you want is the number of pixels per character to be say 16x16 or 32x32, not 256x256. Frankly I don't know the exact number but I'm sure you can research this and find posts from actual framework users telling you the best size.
Here is a nice response on how to best scale a large image (with a link to code).

When designing icons for iOS with vectors, how do I export to the various sizes? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've been told to design iOS icons with vectors, so you can scale to all the different necessary sizes really easily. So I used Sketch 2 (I also have a copy of Illustrator handy) to create an app icon totally comprised of vectors that can scale to any resolution.
However, I'm not sure how I export it to all these different resolutions. What do I do from here? Save it as an .SVG and do something in Illustrator?
If it helps, I created a 200x200 rounded rectangle base for the icon, which is the "size" of it, but again, as it's vector it can scale to any size.
iOS does not read SVG outside of its UIWebView unfortunately (it would be really cool if it did).
Just export your svg as png or jpg in all the sizes you need and then load the right one for each device in your code. For example for iPad retina you want 70x70 jpg if the icon has to be 35x35 points big.
Another, more efficient, way is to just draw your icons programmatically with Core Graphics, so you don't have to load a different icon for each size, and your icons won't look different in future devices with different pixel densities. You can do it manually, or with an app named PaintCode, which is pricey ($99) but very useful: you draw and it generates the code for you to put in the drawrect method.

Artwork for iOS [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
This may be an old and trivial question but I have been struggling to find out which tool should I use to create the artwork (icons, images, logos etc) for my iOS apps? Can somebody here share their first hand experience and suggest some tools (preferably free) to do the job?
I personally use Inkscape and the GIMP, they are the open source equivalents for Illustrator and Photoshop even though they're not so equivalent.
Inkscape can generate PNG files which are good for IOS development.
Whatever you are the most comfortable with. iOS can work with PNG, JPEG, GIF...
If you want to do it the professional way and/or you plan on interacting with other professionals on your project(s), then the standard is to use Photoshop and export UI assets as PNG files.
If you are looking to something similar at a more affordable price, Pixelmator is a popular tool with plenty of tutorials.
Whatever tool you use, be sure to design your artwork using vectors - iOS requires graphic assets in a variety of sizes, and you don't want to design, say, an app icon and realize later that you need a larger one, but have to redo your icon because your source wasn't a vector. After all, you never know when Apple might need a new size (for example, the new iPad and the retina sized splash screens).
Personally, I use photoshop to do my graphic work - mainly because it is a standard, though as long as your tool can generate pngs and jpgs, you should be fine. Just be sure it can handle scaling/zooming large images well as an iPad retina screenshot is 2048x1536 and it is unlikely your monitor will be ale to display it natively.

Resources