iPhone存储大量图像 [英] iPhone storing large amounts of images
问题描述
我有大量与sqlite db中的记录相对应的图像.我应该在哪里存放它们?我有3个版本的同一张图片-大,中号,拇指大小.(我不想将它们存储在db表中,而是从每个记录中引用它们)
I have a large amount of images that correspond to records in a sqlite db. where should I store them? I have 3 versions of the same image - large, med, thumb sizes. (I don't want to store them in the db table, but reference them instead from each record)
所有图像都具有相同的名称-在sqlite表等中,记录1的每个小图像,中图像和大图像文件都将被称为"1.jpg" ...这主要是因为我使用的是图像批处理调整大小的程序将保留相同的文件名并创建一个新文件夹.
all the images have the same name - each small, med and large image files would all be called "1.jpg" for record 1 in the sqlite table etc... this is mainly because I'm using an image batch resizing program that retains the same file name and creates a new folder.
感谢您的帮助.
推荐答案
对于我的缓存图像,我将它们存储在TMP文件夹中,您可以使用NSTemporaryDirectory进行访问.
For my cached images, I stored them in TMP folder, you can access using NSTemporaryDirectory.
我不知道这是否对您的情况有利,还是总体而言不错,但效果很好
I don't know if it is good for your cases or if it is good in general but it works quite well
这篇关于iPhone存储大量图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!