我在 public static int getRotationFromExif(String path) {
try {
ExifInterface exifInterface = new ExifInterface(path);
int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
Log.d("dadada",orientation+"");
if (orientation == ExifInterface.ORIENTATION_ROTATE_180) {
return 180;
} else if (orientation == ExifInterface.ORIENTATION_ROTATE_90) {
return 90;
} else if (orientation == ExifInterface.ORIENTATION_ROTATE_270) {
return 270;
} else if (orientation == ExifInterface.ORIENTATION_NORMAL) {
return Rotation.ROTATION_NORMAL;
} else if (orientation == ExifInterface.ORIENTATION_UNDEFINED) {
return Rotation.ROTATION_UNDEFINED;
} else {
return 0;
}
} catch (Exception e) {
return 0;
}
}
写了一个File
课程。我在File.h
中编写了Directory类,其中包含Directory.h
向量。两个标题具有相同的名称空间。
以下是代码:
File&
当我尝试编译它时,它说:
#include "File.h"
#include <vector>
class Directory : public File
{
public:
...
private:
std::vector<(File&)> files;
};