FBImageUtils.h 846 B

1234567891011121314151617181920212223242526
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <XCTest/XCTest.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. /*! Returns YES if the data contains a PNG image */
  12. BOOL FBIsPngImage(NSData *imageData);
  13. /*! Converts the given image data to a PNG representation if necessary */
  14. NSData *_Nullable FBToPngData(NSData *imageData);
  15. /*! Returns YES if the data contains a JPG image */
  16. BOOL FBIsJpegImage(NSData *imageData);
  17. /*! Converts the given image data to a JPG representation if necessary */
  18. NSData *_Nullable FBToJpegData(NSData *imageData, CGFloat compressionQuality);
  19. NS_ASSUME_NONNULL_END