Skip to content

Commit

Permalink
Fix IDE casing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerhelland committed Nov 10, 2020
1 parent 19cd4c2 commit 08dd3a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
24 changes: 14 additions & 10 deletions Classes/pdMBM.cls
Expand Up @@ -12,18 +12,22 @@ Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'***************************************************************************
'PhotoDemon MBM (Psion, Symbian) Image I/O
'PhotoDemon MBM (Psion, Symbian) Image Importer (export not currently supported)
'Copyright 2020-2020 by Tanner Helland
'Created: 03/November/20
'Last updated: 06/November/20
'Last update: all 1000+ files in the symbian test corpus now load without crashing! Some do not
' load "correctly" but that's because I have no idea how to handle compression values
' of 5 and 6 (which appear with some frequency in the test repo). I'll try and track
' down the folders where these images occur to see if I can solve how to handle them.
'Last updated: 10/November/20
'Last update: finish import code clean-up; export support is not currently planned
'
'This class is a WIP with no guarantee of ever reaching "release" state.
'This class imports legacy Symbian "MBM" files. All well-defined color-depths and compression types
' are supported. (I say "well-defined" because there are many MBM files in the wild with non-standard
' color-depth, grayscale/color, and compression values, and PD is only guaranteed to load files
' produced by official SDKs.)
'
'For details, see https://github.com/tannerhelland/PhotoDemon/issues/341
'For details on how this class came to be, see https://github.com/tannerhelland/PhotoDemon/issues/341
'
'Currently this class only supports importing MBM images. Export support could be added with
' minimal investment code-wise, but there are significant UI implications (especially localization)
' for a matching export dialog, so I do not currently have plans to add this.
'
'Unless otherwise noted, all source code in this file is shared under a simplified BSD license.
' Full license details are available in the LICENSE.md file, or at https://photodemon.org/license/
Expand Down Expand Up @@ -112,8 +116,8 @@ Friend Function IsFileMBM(ByRef srcFile As String, Optional ByVal calledInternal
End Function

'Only valid *after* an image has been loaded, and returns data for the first frame *only*
Friend Function IsGrayscale() As Boolean
If (m_FrameCount > 0) Then IsGrayscale = (Not m_Frames(0).mbm_IsColor)
Friend Function IsMBMGrayscale() As Boolean
If (m_FrameCount > 0) Then IsMBMGrayscale = (Not m_Frames(0).mbm_IsColor)
End Function

'Validate and load a candidate MBM file
Expand Down
2 changes: 1 addition & 1 deletion Modules/ImageLoader.bas
Expand Up @@ -1181,7 +1181,7 @@ Private Function LoadMBM(ByRef srcFile As String, ByRef dstImage As pdImage, ByR
dstImage.SetOriginalColorDepth 32
End If

dstImage.SetOriginalGrayscale cReader.IsGrayscale()
dstImage.SetOriginalGrayscale cReader.IsMBMGrayscale()

'Assume alpha is present on 32-bpp images; assume it is *not* present on lower bit-depths
dstImage.SetOriginalAlpha (dstImage.GetOriginalColorDepth = 32)
Expand Down
2 changes: 1 addition & 1 deletion PhotoDemon.vbp
Expand Up @@ -461,7 +461,7 @@ Description="PhotoDemon Photo Editor"
CompatibleMode="0"
MajorVer=8
MinorVer=9
RevisionVer=164
RevisionVer=166
AutoIncrementVer=1
ServerSupportFiles=0
VersionComments="Copyright 2000-2020 Tanner Helland - photodemon.org"
Expand Down

0 comments on commit 08dd3a7

Please sign in to comment.