PNG metadata 0 dpi - printing

Our printers are looking at the dpi of some of our formatted png files for the purposes of digital garment printing. The files show 300 dpi in Photoshop, but when the same png file is opened in ImageMagick the metadata shows 0 dpi even though the image is clearly present. What could cause this?
My team has no idea where to even start with correcting this problem because it seems to have just started out of nowhere.

Related

Using Jupyter notebook with LaTex. Images not exported to pdf via LaTex

New to Juypter, trying to use it with Latex. Everything works fine except for the images. I used this tutorial: https://www.youtube.com/watch?v=m3o1KXA1Rjk&t=149s
Png Images are fine in markdown, i.e
But LaTex cannot determine size of png images. If I save the image as pdf I get the same issue. If I save the image as eps then LaTex complains that it cannot convert eps to pdf.
Has anyone had this issue? Anyone know how to solve it?
PNG images always contain the size in pixels.
Optionally, they can include a chunk of data named pHYs. This contains the resolution of the image. If this chuck is present, you should be able to find the actual text pHYs in the file.
If this chunk is missing from the PNG file, the scale of the image can not be found.
If you are on a UNIX-like operating system you could use grep or hexdump to check for the text pHYs in the PNG file. The identify program from the ImageMagick suite also can display the resolution of PNG images.
Note that there is an error in the video. The author first uses latex and then pdflatex three times. That is not a good idea, since they have different capabilities w.r.t. graphics. Stick with pdflatex.

Reducing iOS App file size

I have made a very simple iPhone app with Xcode 6.1 and swift. I am really new to ios developing and ran into an app which in the end is 134 mb! of course this is not acceptable.
I have background images for all screen sizes which add up to 20 mb. and thats it! I am storing those images in xcassets, as thats the preferred way I guess.
the app shouldnt have more than 25 mbs, I think.
I figured out that I had some references doubled in my project. I removed these and still my .app file is 89 mbs!
What am I doing wrong? I read several threads on this, but nothing really helped!
What I did until now:
- reduce the size of all pngs
- disable the compress PNG option, as it seems to make the PNGs bigger (lol)
- configured the build settings to run the fastest and smallest build
- Strip Debug Symbols During Copy build setting to Yes (COPY_PHASE_STRIP = YES)
edit1: Apparenty Xcode does something weird with my pngs. Some of those pictures, that are 2 mb originally, are more than 10mb in the .app-file. What does xcode do there ?
It is actually not surprising that the Apple recompressed files are bigger. They are optimized for fast load not small size. If you do not care about size over speed, defiantly do turn off the compression. Even if you do care about speed you can do better than Apple.
https://imageoptim.com/xcode.html
So yes, turn off the PNG compression. The first thing I would do is build the ipa. An ipa is actually a zip file so build the ipa, copy it to a folder on your mac, rename the file with a .zip extension and double click on it. This will expanded it. Find the app in the Payload folder and right mouse click on it and choose show package contents. You will see all the assets. Sort by size. I am guessing you have overly large images. At that size my guess is that the extra size is likely to be caused almost entirely by the PNG files.
Consider using non retina images for some. Honestly most people wont notice. iOS will gracefully use the non retina on retina. This can save a ton of space,
Also consider using jpeg files instead of PNG for some of the files if you do not need transparency. Jpeg files are less efficient but can be much smaller. Compare both. Depends on the extent to which the images are continuous tone.
By default PNG file are 32 bit. 24 bit color and 8 buit alpha/transparency. You can save a bit of size by going to 24 bit. You can also save a lot of size going to 16 bit color or below. At 8 bit PNG files use a color lookup table. Play with Photoshop and the save for we options at PNG with bit depth 8 and below.
I have all sorts of expensive compressing software but often use the $8
https://itunes.apple.com/us/app/lossless-photo-squeezer/id704083918?mt=12
Try the 8 bit PNG option and the JPEG options.
EDIT
I did some research. I had always know Fireworks did better PNG compression. I did not realize that there was an 8bit PNG with an 8 Bit alpha channel. Photoshop supports 8 bit with a 1 bit Alpha Channel. I have always told people to use 32 bit PNG if their transparency needed more than 1 bit. In the future I will let them know the 8 bit with 8 bit alpha may be the better route, They just can use Photoshop for the final save of the file. They just need to save a 32 bit and compress elsewhere.
http://calendar.perfplanet.com/2010/png-that-works/
David

Are there known issues with PNG and JPEG images generated on iOS?

I got the brilliant idea to generate the app store screen shots for my app from... and app! This works great, except for the fact that some of the PNG or JPEG images are not recognized as valid screen shots when I try to upload them. I checked with image viewer, and they have the required size, colorspace and pixel density.
Is there perhaps some strange issues with PNG and/or JPEG images generated on iOS?

iTunes connect does not accept my large app icon

I have submitted a large app icon to iTunes Connect that meets all the specifications: .png file, 1024x1024 pixels, etc. and yet I still get the
error:
"The large app icon you uploaded is not valid. It must be a .jpeg, .jpg, .tif, .tiff, or .png file that is 1024 x 1024 pixels, at least 72 DPI, and in the RGB color space."
I created it using Photoshop Elements. Any guidance is greatly appreciated.
Update - problem solved:
I have tried it again. It worked. Did not need to se exported as PNG or TIF and I am not sure exactly what was different this time (after 4 hours of trying), but it uploaded.
The command below is a hack to base-line PNG images and format them "them
Apple way". Use the following in command line (Terminal), changing "/path/to/image/folder/" to match the location of your PNG files:
sips --deleteColorManagementProperties /path/to/image/folder/*.png
Notice the part about the RGB color space in the requirements. Maybe your file was saved as CMYK originally?
This error may occur if you changed the extension of image by changing name (forcefully from image.jpg to image.png) and you have not exported image to that format.
Simply exporting the image to that format will resolve your issue. You can use 512x512 or 1024x1024 RGB color space image with 72dpi.
Save it with "Not Interlaced" option cos I think it doesn't accept Interlaced PNGs
For those who have noscript or else active. Allow apple.com or otherwise you will just get "Your file could not be loaded. Try again." over and over again.
I had the same problem, tried a lot of different image sizes 1024, 512, jpg, png... First they were all in wrong CMYK color mode. Then I tried jpg with RGB, did not work
and FINALLY:
.PNG 1024x1024px with color mode "RGB" worked
Your Icon File has to be saved with the configuration below:
size 1024 x 1024 pixel with resolution max 72 dpi
your image / picture has no alpha colour (uncheck the alpha checklist)
no transparency, no rounded corner
save in PNG or JPEG format

Can a TImage handle a 32bpp JPG Image?

For some reason, when I load a JPG image at design-time, the image shows as a grey scale image with vertical bars reminiscent of TV scan lines. and the image is not sized properly. The image is 500x364 32 bpp, and previews beautifully.
Is there a limitation of TImage in terms of colour depth?
The JPEG implementation in Delphi has some bugs in them.
What do you mean by 32 bit JPEG? If you mean CMYK JPEG files? If so, then you just hit a major problem area in the JPEG implementation in the JPEG unit.
Note hat there are other JPEG packages that you can download as shareware, like NativeJPG, (I don't know if there are freeware packages) that do support CMYK JPEG files correctly.
It was a long time ago... But the answer is Yes for sure, It's just that You have to do the loading of the JPEG separately in Your code.
I don't remember exactly how, but I remember seeing it done easily;)

Resources