Skip to content

Commit

Permalink
feat: add avif and heif image format file support
Browse files Browse the repository at this point in the history
add MimeType to support avif and heif file.

Log: add avif and heif image format file support
  • Loading branch information
add-uos committed May 31, 2024
1 parent d680c77 commit b5fbb6d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, qt5-image-formats-plugins, deepin-picker-cli
Description: Draw for UOS
Draw is a lightweight drawing tool for users to freely draw and simply edit images.
Recommends: uos-reporter, deepin-event-log
Recommends: uos-reporter, deepin-event-log, kimageformat-plugins
2 changes: 1 addition & 1 deletion deepin-draw.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ GenericName[zh_CN]=画板
GenericName[zh_HK]=畫板
GenericName[zh_TW]=畫板
Icon=deepin-draw
MimeType=image/bmp;image/bmp24;image/jpg;image/jpe;image/jpeg;image/jpeg24;image/jng;image/png;image/tif;image/tiff;image/tiff24;image/xpm;image/xbm;image/pbm;image/pgm;image/ppm;image/xpm;image/x-portable-graymap;image/x-xpixmap;image/x-xbitmap;image/x-portable-pixmap;application/x-ddf
MimeType=image/bmp;image/bmp24;image/jpg;image/jpe;image/jpeg;image/jpeg24;image/jng;image/png;image/tif;image/tiff;image/tiff24;image/xpm;image/xbm;image/pbm;image/pgm;image/ppm;image/xpm;image/x-portable-graymap;image/x-xpixmap;image/x-xbitmap;image/x-portable-pixmap;application/x-ddf;image/heif;image/hej2k;image/avif
Name=Deepin Draw
Name[am_ET]=ዲፕኢን መሳያ
Name[ar]=رسام ديبين
Expand Down
12 changes: 8 additions & 4 deletions src/drawboard/drawboard/utils/setting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Setting::Setting()
QString fileName = Global::configPath() + "/config.conf";
_setting = new QSettings(fileName, QSettings::IniFormat);

supReadFormats = QStringList() << "ddf" << "png" << "jpeg" << "jpg" << "bmp" << "tif" << "tiff" << "ppm" << "xbm" << "xpm" << "pgm" << "pbm";
supReadFormats = QStringList() << "ddf" << "png" << "jpeg" << "jpg" << "bmp" << "tif" << "tiff" << "ppm" << "xbm" << "xpm" << "pgm" << "pbm" << "avif" << "heif" << "heic";
supReadFormatsFilter = QStringList() << QObject::tr("DDF Drawings") + "(*.ddf)"
<< "PNG(*.png)"
<< "JPEG(*.jpeg *.jpg)"
Expand All @@ -22,7 +22,9 @@ Setting::Setting()
<< "PPM(*.ppm)"
<< "XBM(*.xbm)"
<< "XPM(*.xpm)"
<< "PBM(*.pbm)";
<< "PBM(*.pbm)"
<< "AVIF(*.avif)"
<< "HEIC(*.heic *.heif)";
supWriteFormatFilters = QStringList() << QObject::tr("DDF Drawings") + "(*.ddf)"
<< "PNG(*.png)"
<< "JPEG(*.jpeg *.jpg)"
Expand All @@ -31,9 +33,11 @@ Setting::Setting()
<< "PDF(*.pdf)"
<< "PPM(*.ppm)"
<< "XBM(*.xbm)"
<< "XPM(*.xpm)";
<< "XPM(*.xpm)"
<< "AVIF(*.avif)"
<< "HEIC(*.heic *.heif)";

supWriteFormats = QStringList() << "ddf" << "png" << "jpeg" << "jpg" << "bmp" << "tif" << "tiff" << "pdf" << "ppm" << "xbm" << "xpm";
supWriteFormats = QStringList() << "ddf" << "png" << "jpeg" << "jpg" << "bmp" << "tif" << "tiff" << "pdf" << "ppm" << "xbm" << "xpm" << "avif" << "heif" << "heic";
}

Setting::~Setting()
Expand Down

0 comments on commit b5fbb6d

Please sign in to comment.