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 authored and deepin-bot[bot] committed Jun 5, 2024
1 parent 22d345b commit 27f3078
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/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ Application::Application(int &argc, char **argv)
s_drawApp = this;
}

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)"
<< "BMP(*.bmp)"
<< "TIFF(*.tif *.tiff)"
<< "PPM(*.ppm)"
<< "XBM(*.xbm)"
<< "XPM(*.xpm)";
<< "XPM(*.xpm)"
<< "AVIF(*.avif)"
<< "HEIC(*.heic *.heif)";
supWriteFormatFilters = QStringList() << QObject::tr("DDF Drawings") + "(*.ddf)"
<< "PNG(*.png)"
<< "JPEG(*.jpeg *.jpg)"
Expand All @@ -69,9 +71,11 @@ Application::Application(int &argc, char **argv)
<< "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";

#if (DTK_VERSION < DTK_VERSION_CHECK(5, 4, 0, 0))
_dApp = new DApplication(argc, argv);
Expand Down

0 comments on commit 27f3078

Please sign in to comment.