I was able to download and display Webp images without SDWebImageWebPCoder using SDWebImage 5.13.4. So what is the purpose of SDWebImageWebPCoder?
Does SDWebImage already support Webp or am I wrong about something here?
How can I identify if Webp images are being downloaded to my app or not?
According to the ReadMe:
WebP format from iOS 14/macOS 11.0 via SDWebImageAWebPCoder. For lower firmware, use coder plugin SDWebImageWebPCoder
Google introduce the WebP format, and Apple decided later to support it, natively in UIKit.framework. So, natively, UIImage(data: webpData) works on iOS14 +.
Depending on which version of iOS you want to support for your App, you might need or not the SDWebImageWebPCoder plug-in lib, which will decode manually the WebP image raw data.
Related
Android Studio used to generate PNG files for the launcher icons but with the last version, when you create a new project, the default launcher icons inside the mipmap folders are in WEBP format.
I tried to find anything about it but this change is not addressed anywhere. The thing is that if you try to add a new image asset and replace these icons, the generator will create PNG files and you'll have to manually delete the WEBP files.
So, what should one do? Does the Asset Studio have an option for exporting them as WEBP? Is WEBP actually better than PNG (specially for older devices, say API level 21)?
webp is smaller in file size but requires Android 4.3 (API 18)+ for foreground transparency.
At the moment, you still need to manually convert those generated png icons into webp. Android Studio has built-in support for this conversion.
Alternatively, you can use Google's command line tool:
get the encoder: https://developers.google.com/speed/webp/docs/precompiled (see "downloads repository")
convert icons: ./bin/cwebp ./ic_launcher.png -q 100 -o ./ic_launcher.webp
There is an image file named "5.jpg", in the Assets.xcassets named "5".
I wrote code UIImage *image = [UIImage imageNamed:#"5"]; to create the image but app crashes and outputs *** Assertion failure in -[_CUIThemePixelRendition _initWithCSIHeader:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-432.4/CoreTheme/ThemeStorage/CUIThemeRendition.m:3797 in the console.
I had this problem in the XCode 9 beta, running iOS 10 or below. It seems that Apple has dropped support for JPEG files in XCAssets. You can either use do as #Esha suggested and switch to PNG's or you can not use an XCAsset, put the image in your local directory, and refer to it by its URL.
It's possible that Apple did this intentionally (though if they did, I couldn't find any documentation for it) or that this is an XCode 9 bug. I have reported to apple and you can track the progress of the bug here.
Try puting .png images in the asset folder. jpg images will make this issue.
The line should be
UIImage *image = [UIImage imageNamed:#"5.jpg"];
If the file is in PNG format, it is not necessary to specify the .PNG filename extension. Prior to iOS 4, you must specify the filename extension.
From Apple Documentation
It is recommended that you use PNG or JPEG files for most images in your app. Image objects are optimized for reading and displaying both formats, and those formats offer better performance than most other image formats. Because the PNG format is lossless, it is especially recommended for the images you use in your app’s interface.
As Apple introduced the PDF support for the Xcode Image Asset Catalog I was wondering if it's also possible to add PDFs at runtime?
What I want is to download my PDF-Assets and use them similar to JPGs or PNGs in my App with the difference that I only need one instead of 3 resolutions.
use this link it will help you
http://alldonegoodbye.tumblr.com/post/97647217699/xcode-6-vector-image-support-pdf
I'd like to use LibTiff with XE3 to access image meta data information from TIFF files.
I need to find the number of pages inside tiff and their sizes.
I suggested LibTiff because I need the fastest possible implementation of reading tiff image meta data.
The only link I have found is not working anymore:
http://www.awaresystems.be/imaging/tiff/delphi.html
OK, Internet Archive has returned back to operational state, and here is your download:
LibTiffDelphi, full version. Large download (approx 1.39 megabyte), includes Debug and Release versions
Well, the download links at that site do appear to be down. You could try downloading from here instead: http://www.vdebris.comli.com/wp-content/uploads/2009/09/libtiffdelphi_3_9_1.rar
I think you could use Mike Lischke's GraphicEx to solve your problem. The TImageProperties record that is made available by the TGraphicExGraphic class appears to have what you need.
found that code working with *.tif and used graphics + lib for solution building TIF SPLITTER
not sure if it helps to solve your problem
Has anyone had luck converting and using jpeg2000 on the ios? I am writing and inventory app and would love to go with a jpeg2000 file type if I can figure out how to get the phone to support it.
I have seen that there is a nice project for webp - https://github.com/carsonmcdonald/WebP-iOS-example - which seems like it would also work but I think the jpeg2000 results are even better.
Just trying to eval options. Thx in advance
We used JPEG 2000 for my last project (Spot.app)
I downloaded the official open-source JPEG 2000 codec source from here: http://www.openjpeg.org/index.php?menu=download
Build it into a static library and voila.
Here's some sample code I created: https://gist.github.com/1861465
Image IO has nice image conversion functions that eliminate the need for 3rd party code. See more here: How do I convert UIImage to J2K (JPEG2000) in iOS?
No need to bring in the JPEG 2000 project.