将图像复制到粘贴板会将 jpeg 转码为 png
我正在使用iPhone应用程序来嵌入/提取JPEG文件中的数据。我想让用户能够将所得图像复制到剪贴板上,但是当我将结果的jpeg复制到剪贴板时,我使用的代码将其掩盖为PNG。
我正在使用下面的代码,我有什么可以做的,以确保jpeg的copy and粘贴有点复制和粘贴?
// copy to clipboard
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.image = [UIImage imageNamed:@"output.jpg"];
提前致谢!
I'm working on an iPhone app to embed/extract data in jpeg files. I want to give the user the ability to copy the resulting image to the clipboard, but the code I'm using coverts the resulting jpeg into a png when it gets copied to the clipboard.
I'm using the code below, is there anything I can do to ensure it is a bit by bit copy and paste of the jpeg?
// copy to clipboard
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.image = [UIImage imageNamed:@"output.jpg"];
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我终于弄清楚了这一点。
...
I finally figured this one out.
...
完全工作的代码,我使用相同的代码
祝你好运!
Completely working code , i m using same code
Good Luck !!!!