When loading a locally stored PDF file, a pink rectangular box is found around the images. These are not links but yet they are sorrounded by a pink rectangular window. when viewed through PREVIEW in mac this seems to be working absolutely fine.
Related
I am using a capture handler to download a PNG image for a selector. URL is working fine when loaded individually, but the image downloaded is not showing the opacity of some of the elements in it, even when the dpi is given as 192. Am using bootstrap opacity classes("opacity-8")
Tried to debug using debug parameter, but It didn't work. Is there a way that I can debug it more closely or a way to see the exact application page used while capturing?
Tried to overlay a div with faded color, but it is not working too.
Well, here is my problem.
I'm developing the front end of a website using rails. and I'm using svg images. If you go to http://de-regalos-qa.herokuapp.com/products/9 you would see an image with cards (visa, mastercard, etc) this image looks like transparent or with a very light opacity but if you download the image you would see the image with the original colors. This only happens with chrome and firefox but not with safari. This happens only with two of the images from all my site. I dont understand why.
Chrome screenshot:
I have a viewcontroller with a toolbar with 2 bar button items. The image on one is a simple flat icon. The other is a complex image reduced to 28x28 pixels from a 256x256 image. The complex image shows up as a blob as shown below. The actual image is also show in the picture. It is not clear what I am doing wrong. The project code is available in the following link:
Project code
John Griffith on Apple Developer Forum provided this explanation which made a lot of sense. I need to redesign my icons if I want to proceed along this line:
Toolbar images are normally rendering mode "template" - only the alpha channel is used. Any non-transparent pixels are drawn in the bar's tint color. It may be possible to create a UIImage with rendering mode "always original" to preserve the look of your image, but then it won't respond to changes in tint color.
I have downloaded your project. The first thing you should do is to move your image files into the images.xcassets folder. Read here to understand why.
The image you are trying to display is actually just a red rectangle:
As you can see, opening in another program also just displays it as a red rectangle. Be sure to use the correct Image file. The problem lies not with your project but rather the image file you are using.
Everything seems pretty standard I downloaded PDF GENERATION SAMPLE and used my own assets at normal resolutions and my images look a little off.
Here's the asset
Here's what it looks like in app
And this is what it looks like in the PDF at 100% zoom
The code in the drawImage function is as simple as it gets
UIImage * demoImage = [UIImage imageNamed:#"icon_map_project.png"];
[demoImage drawInRect:CGRectMake( (pageSize.width - demoImage.size.width)/2,
350,
demoImage.size.width,
demoImage.size.height)];
Nothing fancy at all. I do admit that my familiarity with the details of how PDF work, DPI, and things like that are beyond me at this point.
I've looked at LibHaru and think it's a great system but I'd rather keep this within the confines of UIKit/CoreGraphics.
You'll notice a strange jaggedness on the right side, even shrinking the image down by 50% doesn't seem to help.
Here's a zoomed up image using Digital Color Meter with the PDF at 100% and then the app
As you can see the image simply does not render correctly into the PDF and I'm struggling to find a solution for this.
Thanks for any advice.
You draw the image in the PDF in a rectangle that matches the image size. This results in a 72dpi for the image. Because the viewer application use 96dpi or a higher value as reference for 100% zoom, when the file is displayed at 100% your image will be rendered 100% * 96/72 scale. If you enlarge the bitmap at that scale with an imaging tool you'll see a similar jaggedness. The solution is to use a larger image drawn in a 37x36pt rectangle so that the resulting image dpi is higher.
If you zoom your PDF file to 75% the image size displayed on the page should match the image size in your application (this assumption is based on a 96 dpi screen).
I've started using Fireworks to do prototypes, but now I need to code a prototype in HTML/CSS. I have all relevant image elements sliced, but the default behavior for Fireworks seems to be to export slides with any visible background elements embedded in the picture. E.g. When I export a logo I want the area around the logo to be transparent - I don't want the background behind the logo, which was located at a different layer.
Is it possible to export all elements with the transparency intact?
Copy your logo to a new document and export it. Lay it on top of your header graphics using CSS or maybe table if you are going that way. The point is if you see the background colors around the logo in your slice view, there is no way of exporting it transparently. The purpose of slicing is to export what you see in the sliced rectangle.
Make sure that there is no background in the image, either use the wand tool to delete the background or some other method and then make sure the images are exported as .png