SDAssociatedObject.m 872 B

123456789101112131415161718192021222324252627
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import "SDAssociatedObject.h"
  9. #import "UIImage+Metadata.h"
  10. #import "UIImage+ExtendedCacheData.h"
  11. #import "UIImage+MemoryCacheCost.h"
  12. #import "UIImage+ForceDecode.h"
  13. void SDImageCopyAssociatedObject(UIImage * _Nullable source, UIImage * _Nullable target) {
  14. if (!source || !target) {
  15. return;
  16. }
  17. // Image Metadata
  18. target.sd_isIncremental = source.sd_isIncremental;
  19. target.sd_imageLoopCount = source.sd_imageLoopCount;
  20. target.sd_imageFormat = source.sd_imageFormat;
  21. // Force Decode
  22. target.sd_isDecoded = source.sd_isDecoded;
  23. // Extended Cache Data
  24. target.sd_extendedObject = source.sd_extendedObject;
  25. }