Skip to content

Commit 7701254

Browse files
committed
🖥️ v3.1.2
- Better HiDPI support (#21) - Fix: Blurry icons in context menus
1 parent 5dbcfd2 commit 7701254

File tree

91 files changed

+2294
-1987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+2294
-1987
lines changed

.vs/quick-picture-viewer/v16/.suo

45 KB
Binary file not shown.

docs/imgs/banner.png

-66.4 KB
Loading

docs/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@
1010
<script src="js/snowflakes.js"></script>
1111
<script src="js/index.js"></script>
1212
<link rel="shortcut icon" href="https://github.com/ModuleArt/quick-picture-viewer/blob/master/quick-picture-viewer/resources/imgs/picture32.png?raw=true" type="image/png">
13+
<meta name="twitter:card" content="summary_large_image">
14+
<meta name="twitter:title" content="Quick Picture Viewer">
15+
<meta name="twitter:description" content="🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.">
16+
<meta name="twitter:image:src" content="https://repository-images.githubusercontent.com/227230655/fc018000-8ae6-11eb-8ea0-a0c3744f45db">
17+
<meta property="og:type" content="website">
18+
<meta property="og:site_name" content="Module Art">
19+
<meta property="og:title" content="Quick Picture Viewer">
20+
<meta property="og:description" content="🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.">
21+
<meta property="og:url" content="https://moduleart.github.io/quick-picture-viewer/">
22+
<meta property="og:locale" content="en_US">
23+
<meta property="og:image" content="https://repository-images.githubusercontent.com/227230655/fc018000-8ae6-11eb-8ea0-a0c3744f45db">
1324
</head>
1425
<body>
1526
<div id="special-effects" class="special-effects"></div>
3.95 KB
Binary file not shown.

quick-picture-viewer/App.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<section name="quick_picture_viewer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
66
</sectionGroup>
77
</configSections>
8+
<System.Windows.Forms.ApplicationConfigurationSection>
9+
<add key="DpiAwareness" value="PerMonitorV2" />
10+
</System.Windows.Forms.ApplicationConfigurationSection>
811
<startup>
912
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
1013
</startup>

quick-picture-viewer/MainForm.Designer.cs

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quick-picture-viewer/MainForm.cs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,16 @@ private void openFile(string path, bool goPrev = false)
361361
string ext = Path.GetExtension(path);
362362
if (ext == ".webp")
363363
{
364-
byte[] rawWebP = File.ReadAllBytes(path);
365-
using (WebP webp = new WebP())
364+
Bitmap bmp = WebpWrapper.ParseWebp(path);
365+
switch (WebpWrapper.CurrentError)
366366
{
367-
WebPDecoderOptions decoderOptions = new WebPDecoderOptions();
368-
decoderOptions.use_threads = 1;
369-
decoderOptions.alpha_dithering_strength = 100;
370-
openImage(webp.Decode(rawWebP, decoderOptions), Path.GetDirectoryName(path), Path.GetFileName(path));
367+
case WebpWrapper.Error.NoError:
368+
openImage(bmp, Path.GetDirectoryName(path), Path.GetFileName(path));
369+
break;
370+
case WebpWrapper.Error.UnableToOpen:
371+
closeFile();
372+
showSuggestion(WebpWrapper.TypeName + " - " + LangMan.Get("unable-open-file") + ": " + Path.GetFileName(path), SuggestionIcon.Warning);
373+
break;
371374
}
372375
}
373376
else if (ext == ".ico")
@@ -864,7 +867,7 @@ private void saveAsButton_Click(object sender, EventArgs e)
864867
case ".tiff":
865868
case ".tif":
866869
saveFileDialog1.FilterIndex = 5;
867-
ext = ".tif";
870+
ext = ".tiff";
868871
break;
869872
case ".ico":
870873
saveFileDialog1.FilterIndex = 6;
@@ -2544,11 +2547,7 @@ private void SaveFile(string path, string ext, bool dispose)
25442547
IcoWrapper.ConvertToIcon(bmpToSave, memory);
25452548
break;
25462549
case ".webp":
2547-
using (WebP webp = new WebP())
2548-
{
2549-
bytes = webp.EncodeLossy(bmpToSave);
2550-
fs.Write(bytes, 0, bytes.Length);
2551-
}
2550+
WebpWrapper.Save(bmpToSave, path);
25522551
break;
25532552
}
25542553
}

quick-picture-viewer/MainForm.resx

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,9 @@
12711271
<data name="showNavArrowsBtn.Font" type="System.Drawing.Font, System.Drawing">
12721272
<value>Segoe UI, 10pt</value>
12731273
</data>
1274+
<data name="showNavArrowsBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1275+
<value>None</value>
1276+
</data>
12741277
<data name="showNavArrowsBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
12751278
<value>F6</value>
12761279
</data>
@@ -1283,6 +1286,9 @@
12831286
<data name="showToolbarBtn.Font" type="System.Drawing.Font, System.Drawing">
12841287
<value>Segoe UI, 10pt</value>
12851288
</data>
1289+
<data name="showToolbarBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1290+
<value>None</value>
1291+
</data>
12861292
<data name="showToolbarBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
12871293
<value>F7</value>
12881294
</data>
@@ -1295,6 +1301,9 @@
12951301
<data name="showStatusbarBtn.Font" type="System.Drawing.Font, System.Drawing">
12961302
<value>Segoe UI, 10pt</value>
12971303
</data>
1304+
<data name="showStatusbarBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1305+
<value>None</value>
1306+
</data>
12981307
<data name="showStatusbarBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
12991308
<value>F8</value>
13001309
</data>
@@ -1307,6 +1316,9 @@
13071316
<data name="showMenuItem.Font" type="System.Drawing.Font, System.Drawing">
13081317
<value>Segoe UI, 10pt</value>
13091318
</data>
1319+
<data name="showMenuItem.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1320+
<value>None</value>
1321+
</data>
13101322
<data name="showMenuItem.Size" type="System.Drawing.Size, System.Drawing">
13111323
<value>287, 24</value>
13121324
</data>
@@ -1325,6 +1337,9 @@
13251337
<data name="wallpaperBtn.Enabled" type="System.Boolean, mscorlib">
13261338
<value>False</value>
13271339
</data>
1340+
<data name="wallpaperBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1341+
<value>None</value>
1342+
</data>
13281343
<data name="wallpaperBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
13291344
<value>Alt+B</value>
13301345
</data>
@@ -1343,6 +1358,9 @@
13431358
<data name="qlibToolsep3.Size" type="System.Drawing.Size, System.Drawing">
13441359
<value>284, 6</value>
13451360
</data>
1361+
<data name="copyImageBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1362+
<value>None</value>
1363+
</data>
13461364
<data name="copyImageBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
13471365
<value>Ctrl+C</value>
13481366
</data>
@@ -1352,6 +1370,9 @@
13521370
<data name="copyImageBtn.Text" xml:space="preserve">
13531371
<value>copy image</value>
13541372
</data>
1373+
<data name="copyFileBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1374+
<value>None</value>
1375+
</data>
13551376
<data name="copyFileBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
13561377
<value>Ctrl+Shift+C</value>
13571378
</data>
@@ -1361,12 +1382,18 @@
13611382
<data name="copyFileBtn.Text" xml:space="preserve">
13621383
<value>copy file</value>
13631384
</data>
1385+
<data name="copyBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1386+
<value>None</value>
1387+
</data>
13641388
<data name="copyBtn.Size" type="System.Drawing.Size, System.Drawing">
13651389
<value>287, 24</value>
13661390
</data>
13671391
<data name="copyBtn.Text" xml:space="preserve">
13681392
<value>copy</value>
13691393
</data>
1394+
<data name="pasteBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1395+
<value>None</value>
1396+
</data>
13701397
<data name="pasteBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
13711398
<value>Ctrl+V</value>
13721399
</data>
@@ -1379,6 +1406,9 @@
13791406
<data name="selectAllBtn.Enabled" type="System.Boolean, mscorlib">
13801407
<value>False</value>
13811408
</data>
1409+
<data name="selectAllBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
1410+
<value>None</value>
1411+
</data>
13821412
<data name="selectAllBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
13831413
<value>Ctrl+A</value>
13841414
</data>
@@ -1389,7 +1419,7 @@
13891419
<value>select all</value>
13901420
</data>
13911421
<data name="rmbMenu.Size" type="System.Drawing.Size, System.Drawing">
1392-
<value>288, 152</value>
1422+
<value>288, 174</value>
13931423
</data>
13941424
<data name="&gt;&gt;rmbMenu.Name" xml:space="preserve">
13951425
<value>rmbMenu</value>
@@ -1569,7 +1599,7 @@
15691599
<value>picturePanel</value>
15701600
</data>
15711601
<data name="&gt;&gt;picturePanel.Type" xml:space="preserve">
1572-
<value>quick_picture_viewer.CustomPanel, quick-picture-viewer, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null</value>
1602+
<value>quick_picture_viewer.CustomPanel, quick-picture-viewer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null</value>
15731603
</data>
15741604
<data name="&gt;&gt;picturePanel.Parent" xml:space="preserve">
15751605
<value>$this</value>
@@ -4367,6 +4397,12 @@
43674397
<data name="&gt;&gt;openRecursive.Type" xml:space="preserve">
43684398
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
43694399
</data>
4400+
<data name="&gt;&gt;saveBtn.Name" xml:space="preserve">
4401+
<value>saveBtn</value>
4402+
</data>
4403+
<data name="&gt;&gt;saveBtn.Type" xml:space="preserve">
4404+
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
4405+
</data>
43704406
<data name="&gt;&gt;saveAsButton.Name" xml:space="preserve">
43714407
<value>saveAsButton</value>
43724408
</data>
@@ -4769,12 +4805,6 @@
47694805
<data name="&gt;&gt;infoTooltip.Type" xml:space="preserve">
47704806
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
47714807
</data>
4772-
<data name="&gt;&gt;saveBtn.Name" xml:space="preserve">
4773-
<value>saveBtn</value>
4774-
</data>
4775-
<data name="&gt;&gt;saveBtn.Type" xml:space="preserve">
4776-
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
4777-
</data>
47784808
<data name="&gt;&gt;$this.Name" xml:space="preserve">
47794809
<value>MainForm</value>
47804810
</data>

quick-picture-viewer/MiniViewForm.Designer.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

quick-picture-viewer/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ static class Program
99
[STAThread]
1010
static void Main(string[] args)
1111
{
12-
if (Environment.OSVersion.Version.Major >= 6) NativeMan.SetProcessDPIAware();
12+
NativeMan.SetProcessDpiAwarenessContext(NativeMan.DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
1313

1414
Application.EnableVisualStyles();
1515
Application.SetCompatibleTextRenderingDefault(false);

quick-picture-viewer/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Version information for an assembly consists of the following four values:
2626
//
2727
// Major Version
28-
// Minor Version
28+
// Minor Versionffgg
2929
// Build Number
3030
// Revision
3131
//

0 commit comments

Comments
 (0)