# Cover Image Dimensions

**URL:** https://community.mp3tag.de/t/cover-image-dimensions/14424
**Category:** Support
**Created:** [February 4, 2013, 2:53am UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424 "2013-02-04T02:53:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Quisquose](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/q/ea666f/32.png) [@Quisquose](https://community.mp3tag.de/u/Quisquose)
#### Post date: [February 4, 2013, 2:53am UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424/1 "2013-02-04T02:53:15Z")

</div>

Hi,

I would like to go through my entire music library and replace the low quality small cover art from my oldest tracks to higher quality larger images.

In order to identify which covers need replacing, I wanted to add a cover image dimension field to my list of columns so that I could then scroll through and identify the files that needed attention.

However, have been through the various options for adding a new column and I can't find any such value. At first I thought the cover size value would do it (listed under 'Information Fields') but that relates to the file size rather than the pixel dimensions of the image.

So, how do I go about adding a column so that I can see for exmple:

350 x 350  
500 x 500  
625 x 625

etc.

Thanks very much.

---

<div class="post-metadata">

### Author: ![stevehero](https://community.mp3tag.de/user_avatar/community.mp3tag.de/stevehero/32/337_2.png) [@stevehero](https://community.mp3tag.de/u/stevehero)
#### Post date: [February 4, 2013, 3:21am UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424/2 "2013-02-04T03:21:45Z")

</div>

> [@Quiquose](#):
>
> So, how do I go about adding a column so that I can see for exmple:
> 
> 350 x 350  
> 500 x 500  
> 625 x 625

It is not possible to do this. See [this post](https://community.mp3tag.de/t/13562/1) to show you how to show the column which displays the size in kb and filtering using F3.

You can also export the covers to files to see which ones are not matching your requirements either.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [February 4, 2013, 7:46am UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424/3 "2013-02-04T07:46:07Z")

</div>

> [@Quiquose](#):
>
> ... So, how do I go about adding a column so that I can see for exmple: 350 x 350 ...

That's not possible within Mp3tag alone.  
You need an external tool to analyze the cover images.  
See proposal there ...  
[/t/6421/1](https://community.mp3tag.de/t/6421/1)

DD.20130204.0940.CET

---

<div class="post-metadata">

### Author: ![jrsousa2](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/278dde/32.png) [@jrsousa2](https://community.mp3tag.de/u/jrsousa2)
#### Post date: [September 22, 2019, 4:25pm UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424/4 "2019-09-22T16:25:14Z")

</div>

If you use iTunes, I've created a vb script that extracts the dimensions of the cover of an image.  
It does that by extracting the cover to a file, and then using the windows file system to check the dimensions.  
Most of the tags of the selected playlist are saved in an excel file at the end.

When you call the script, there are 4 possible parameters. -A for art, -D for dimensions, -S for grouping/sort tags, and -H for hexadecimal cover reading (don't use this option.)

Note that you have to change both the location where the final excel file is saved, and the location where the cover is extracted to so its dimensions are grabbed. They are currently pointing to folders on my computer, and the script will crash since they probably don't exist in your computer.

> '=========================================================================  
> 'CREATE AN XL SHEET FROM A PLAYLIST  
> 'CREATES AN EXCEL SHEET WITH ALL THE FILES IN A PLAYLIST,  
> 'LISTING SONG NAME, ALBUM, YEAR, ETC.  
> 'IN THIS CODE, I SAVE THE ART TO A FILE AND THEN CHECK ITS SIZE  
> '==========================================================================
> 
> Option Explicit
> 
> Dim TrackPath ' The path to the track  
> Dim sources  
> Dim source  
> Dim playlists  
> Dim playlist  
> Dim playlistName  
> Dim m  
> Dim i  
> Dim j  
> Dim k
> 
> Dim iTunesApp ' iTunes.Application object used to access the iTunes application.  
> Dim tracks ' The tracks collection object of the Library object.  
> Dim FSO  
> Dim objFile  
> Dim objLP
> 
> Dim result  
> Dim listarray  
> Dim match\_row  
> Dim track  
> Dim songYear  
> Dim num  
> Dim NumRows  
> Dim numtracks
> 
> 'ARTWORK VARIABLES  
> Dim Artobj  
> Dim Artobj\_Count  
> Dim Art\_Filename  
> Dim Formato
> 
> 'LEITURA DAS TAGS  
> Dim Art\_Size  
> Dim strHex  
> Dim Hex\_Size
> 
> 'LEITURA DIRETA DA ARTWORK  
> Dim Art\_Size2  
> Dim Art\_Hei  
> Dim Art\_Wid
> 
> 'PARAMETROS DE CHAMADA DO PROGRAMA  
> Dim Art\_Fields  
> Dim Sort\_Fields  
> Dim Dim\_Fields  
> Dim Hex\_Fields
> 
> Dim Args  
> Dim Arg  
> Dim ExtArray(4)
> 
> 'INCREMENTOS PARA OS NUMEROS DAS COLUNAS  
> Dim Marca  
> Dim Marca\_Hex  
> Dim Marca\_Dim  
> Dim Marca\_Sort
> 
> 'CREATES AN EXCEL SHEET  
> Dim objExcel  
> Dim my\_sheet  
> Dim objWorkbook
> 
> 'FUNCTION  
> Sub CoverSize (ByVal strSourceFile, ByVal Format\_pmt, ByRef Artsize\_pmt, ByRef Hex\_Size\_pmt, ByRef strHex\_Pmt)  
> 'remove duplicate space from the Target file name  
> Dim strBuffer  
> Dim arrBuffer  
> Dim HeaderPos  
> Dim HeaderIni  
> Dim HeaderFim  
> Dim Aux  
> Dim Tam  
> Dim Inicio  
> Dim Fim  
> Dim BS  
> Dim i  
> Dim j
> 
> Set BS = CreateObject("ADODB.Stream")
> 
> BS.Type = 1  
> BS.Open  
> BS.LoadFromFile strSourceFile  
> BS.Position = 0  
> arrBuffer = BS.Read(BS.Size)  
> 'strBuffer = MidB(arrBuffer, 1, .Size)  
> 'Ler entre Apic (41 50 49 43) e Image (69 6D 61 67 65), depois converter pra decimal  
> HeaderIni = InstrB(1, arrBuffer, ChrB(&H41) & ChrB(&H50) & ChrB(&H49) & ChrB(&H43), 0)+4 'APIC Header  
> HeaderFim = InstrB(HeaderIni, arrBuffer, ChrB(&H69) & ChrB(&H6D) & ChrB(&H61) & ChrB(&H67), 0)-5  
> Tam= HeaderFim-HeaderIni  
> 'WScript.Echo "Header Ini: " & HeaderIni & " Fim: " & HeaderFim & " ,Tam: " & Tam
> 
> strBuffer = MidB(arrBuffer,HeaderIni,2\*Tam)  
> Aux = Right("0000" & Hex(AscW(Mid(strBuffer,1,1))), 4)  
> Hex\_Size\_Pmt = Mid(Aux,3,2) & Mid(Aux,1,2)  
> 'WScript.Echo "1) i=" & 1 & ",Hex: " & Aux & " tam: " & Len(Aux)  
> For i = 2 To Len(strBuffer) Step 1  
> Aux = Right("0000" & Hex(AscW(Mid(strBuffer,i,1))), 4)  
> Hex\_Size\_Pmt = Hex\_Size\_Pmt & Mid(Aux,3,2) & Mid(Aux,1,2)  
> 'WScript.Echo "1) i=" & i & " ,Unicode: " & Mid(strBuffer,i,1) & ",Ascii: " & AscW(Mid(strBuffer,i,1)) & ",Hex: " & Aux & " tam: " & Len(Aux)  
> Next  
> 'WScript.Echo "Hex rep: " & strHEX\_Pmt & " " & CLng("&H" & strHEX\_Pmt)  
> Artsize\_pmt = CLng("&H" & Hex\_Size\_Pmt)-14
> 
> 'GRAB A PIECE OF THE IMAGE  
> strHEX\_Pmt = ""  
> If True Then  
> If HeaderIni = 0 Then HeaderIni = 1: exit sub 'PIC not found searching from start  
> If Format\_pmt = "jpg" Then  
> Inicio = InstrB(HeaderIni, arrBuffer, ChrB(&HFF) & ChrB(&HD8), 0)-1 'get FF D8 token position  
> 'Fim = InstrB(Artsize\_pmt-5, arrBuffer, ChrB(&HFF) & ChrB(&HD9), 0) 'get FF D9 token position  
> 'Artsize\_pmt = Fim-Inicio+1  
> Else  
> Artsize\_pmt = Artsize\_pmt+1  
> Inicio = InstrB(HeaderIni, arrBuffer, ChrB(&H89) & ChrB(&H50) & ChrB(&H4E), 0)-1 'get 89 50 4E token position  
> End If  
> 'THE BELOW IS JUST FOR THE PURPOSE OF CREATING THE BYTE STRING  
> Fim = Inicio+CLng("&H" & Hex\_Size\_Pmt)
> 
> 'WScript.Echo "Size: " & Artsize\_pmt
> 
> 'Saves the Hex representation  
> strBuffer = MidB(arrBuffer,Inicio,80)  
> strHEX\_Pmt = Hex(Ascw(Mid(strBuffer,1,1)))  
> For i = 2 To Len(strBuffer) Step 1  
> strHEX\_Pmt = strHEX\_Pmt & "-" & Hex(Ascw(Mid(strBuffer,i,1)))  
> 'WScript.Echo Mid(strBuffer,i,1),Hex(Ascw(Mid(strBuffer,i,1)))  
> Next
> 
> strBuffer = MidB(arrBuffer,(Inicio+Fim)\2,80)  
> For i = 1 To Len(strBuffer) Step 1  
> strHEX\_Pmt = strHEX\_Pmt & "-" & Hex(Ascw(Mid(strBuffer,i,1)))  
> Next
> 
> 'THIS IS FAILING JUST FOR ONE PAIR OF COVERS  
> strBuffer = MidB(arrBuffer,Fim-200,80)  
> For i = 1 To Len(strBuffer) Step 1  
> strHEX\_Pmt = strHEX\_Pmt & "-" & Hex(Ascw(Mid(strBuffer,i,1)))  
> Next  
> End If
> 
> End Sub  
> 'END OF FUNCTION  
> 'END OF FUNCTION  
> 'END OF FUNCTION
> 
> 'MAIN PROGRAM  
> 'MAIN PROGRAM  
> 'MAIN PROGRAM  
> 'MAIN PROGRAM  
> Set fso = CreateObject("Scripting.FileSystemObject")
> 
> ExtArray(0) = "unk"  
> ExtArray(1) = "jpg"  
> ExtArray(2) = "png"  
> ExtArray(3) = "bmp"
> 
> Art\_Fields = False  
> Hex\_Fields = False  
> Dim\_Fields = False  
> Sort\_Fields = False
> 
> Set Args = WScript.Arguments  
> 'Scan command line arguments  
> For Each Arg in Args  
> 'Is it a flag?  
> If Instr(1,arg,"-",1) = 1 or Instr(1,arg,"/", 1) = 1 Then  
> 'Check for list flag  
> If UCase(arg) = "-A" or UCase(arg) = "/A" then  
> Art\_Fields = True  
> End If  
> If UCase(arg) = "-H" or UCase(arg) = "/H" then  
> Hex\_Fields = True  
> End If  
> If UCase(arg) = "-D" or UCase(arg) = "/D" then  
> Dim\_Fields = True  
> End If  
> If UCase(arg) = "-S" or UCase(arg) = "/S" then  
> Sort\_Fields = True  
> End If  
> End If  
> Next
> 
> 'TRIES TO CREATE AN INTERFACE WITH EXCEL  
> Set objExcel = CreateObject("Excel.Application")  
> objExcel.Visible = False
> 
> objExcel.Application.Visible = False
> 
> Set objWorkbook = objExcel.Workbooks.Add()
> 
> Marca = 10
> 
> objExcel.Cells(1, 1) = "Art"  
> objExcel.Cells(1, 2) = "Title"  
> objExcel.Cells(1, 3) = "AA"  
> objExcel.Cells(1, 4) = "Album"  
> objExcel.Cells(1, 5) = "Year"  
> objExcel.Cells(1, 6) = "Location"  
> objExcel.Cells(1, 7) = "Bitrate"  
> objExcel.Cells(1, 8) = "Length"  
> objExcel.Cells(1, 9) = "Rating"  
> objExcel.Cells(1, 10) = "Genre"
> 
> If Art\_Fields Then  
> objExcel.Cells(1, 11) = "Covers"  
> objExcel.Cells(1, 12) = "Format"  
> Marca = Marca+2  
> End If
> 
> If Hex\_Fields Then  
> Marca\_Hex = Marca  
> objExcel.Cells(1, Marca\_Hex+1) = "Art\_Size"  
> objExcel.Cells(1, Marca\_Hex+2) = "Hex\_Size"  
> objExcel.Cells(1, Marca\_Hex+3) = "Bytes"  
> Marca = Marca+3  
> End If
> 
> If Dim\_Fields Then  
> Marca\_Dim = Marca  
> objExcel.Cells(1, Marca\_Dim+1) = "Hei"  
> objExcel.Cells(1, Marca\_Dim+2) = "Wid"  
> objExcel.Cells(1, Marca\_Dim+3) = "Art\_Size2"  
> Marca = Marca+3  
> End If
> 
> If Sort\_Fields Then  
> Marca\_Sort = Marca  
> objExcel.Cells(1, Marca\_Sort+1) = "Grouping"  
> objExcel.Cells(1, Marca\_Sort+2) = "Art\_Sort"  
> objExcel.Cells(1, Marca\_Sort+3) = "AA\_Sort"
> 
> 'objExcel.Cells(1, 14) = "PlayedCount"  
> 'objExcel.Cells(1, 15) = "SkippedCount"  
> 'objExcel.Cells(1, 16) = "Date\_added"  
> 'objExcel.Cells(1, 17) = "Grouping"  
> End If
> 
> Set iTunesApp = CreateObject("iTunes.Application.1")  
> Set sources = iTunesApp.Sources
> 
> If Art\_Fields Or Dim\_Fields Then On Error Resume Next
> 
> For i = 1 to sources.Count  
> Set source = sources.Item(i)
> 
> If source.Kind = 1 Then  
> Set playlists = source.Playlists  
> Wscript.Echo "Select from the following playlists" & chr(13) & chr(10)  
> Wscript.Echo "Number of playlists: " & playlists.Count  
> For j = 1 to playlists.Count  
> Set playlist = playlists.Item(j)  
> playlistName = playlist.Name  
> Wscript.Echo j & ": " & playlistName  
> Next  
> Wscript.Echo ""  
> Wscript.StdOut.Write "Enter comma-separated lists to process: "  
> result = WScript.StdIn.ReadLine  
> 'COLOCAR O NUMERO DA PLAYLIST DESEJADA AQUI  
> 'result = 41
> 
> ```
> listarray = split(result, ",")
> For k = 0 to UBound(listarray)
> num = listarray(k)
> Set playlist = playlists.Item(num)
> playlistName = playlist.Name
> Wscript.Echo ""
> Wscript.Echo chr(9) & "Fields: Art: " & Art_Fields & ", Hex: " & Hex_Fields & ", Dim: " & Dim_Fields & ", Sort: " & Sort_Fields
> Wscript.Echo chr(9) & "Processing playlist " & Num & ": " & playlistName
> 
> Wscript.Echo ""
> Wscript.Echo ""
> 
> Set tracks = playlist.Tracks
> numtracks = tracks.Count
> Wscript.Echo chr(9) & "tracks: " & numtracks
> NumRows = 1
>          
> For m = 1 to numtracks
> If m > tracks.Count Then Exit For
> Set track = tracks.Item(m)
>      		
> If track.Kind = 1 Then
> NumRows = NumRows + 1
>      		   
> If Art_Fields Or Hex_Fields Or Dim_Fields Then
> Formato = Empty
> Set Artobj = track.Artwork
> Artobj_Count = Artobj.Count
> If Artobj_Count>0 And FSO.FileExists(track.Location) Then
> Formato = ExtArray(Artobj.Item(1).Format)
> End If  
> End If   
>                
> If Hex_Fields Then
> Art_size = Empty
> Hex_Size = Empty
> strHex = Empty
> If Formato="jpg" Or Formato="png" Then
> CoverSize track.Location, Formato, Art_Size, Hex_Size, strHex
> End If
> End If                      
> 
> 'ESSA INDENTACAO ESTA CORRETA
> 'DIMENSIONS
> If Dim_Fields Then
> Art_Size2 = Empty
> Art_Wid = Empty
> Art_Hei = Empty
> WScript.Echo "File " & NumRows-1 & ": " & track.Location
> 
> ```

```
                     **'SET THE EXTRACTED IMAGE PATH HERE**

```

> ```
> Art_Filename = "D:\Z-Covers\Check_size" & "." & Formato
> Artobj.Item(1).SaveArtworkToFile(Art_Filename)
> If FSO.FileExists(Art_filename) And (Formato="jpg" or Formato="png") Then
> Set objFile = FSO.GetFile(Art_filename)
> Art_Size2 = objFile.Size
> Set objFile = Nothing
> Set objLP = loadpicture(Art_Filename)
> Art_Wid = round(objLP.width/26.4583)
> Art_Hei = round(objLP.height/26.4583)
> Set objLP = Nothing
> End If
> End If
>                
> If track.Year <> Empty Then
> songYear = track.Year
> Else songYear = Empty
> End If
> 
> 'COLUNAS=ARTIST,ALBUM ARTIST,NAME,ALBUM,YEAR,LOCATION,HASART
> objExcel.Cells(NumRows, 1) = track.Artist
> objExcel.Cells(NumRows, 2) = track.Name
> objExcel.Cells(NumRows, 3) = track.AlbumArtist
> objExcel.Cells(NumRows, 4) = track.Album
> objExcel.Cells(NumRows, 5) = songYear
> objExcel.Cells(NumRows, 6) = track.Location
> objExcel.Cells(NumRows, 7) = track.Bitrate
> objExcel.Cells(NumRows, 8) = track.Time
> objExcel.Cells(NumRows, 9) = track.Rating
> objExcel.Cells(NumRows, 10) = track.Genre
> 
> If Art_Fields Then
> objExcel.Cells(NumRows, 11) = Artobj_Count
> objExcel.Cells(NumRows, 12) = Formato
> End If   
> 
> If Hex_Fields Then
> objExcel.Cells(NumRows, Marca_Hex+1) = Art_size
> objExcel.Cells(NumRows, Marca_Hex+2) = Hex_Size 
> objExcel.Cells(NumRows, Marca_Hex+3) = strHex
> End If
> 
> 'O ABAIXO VEM DA LEITURA DIRETA DO ARQUIVO
> If Dim_Fields Then
> objExcel.Cells(NumRows, Marca_Dim+1) = Art_Hei
> objExcel.Cells(NumRows, Marca_Dim+2) = Art_Wid
> objExcel.Cells(NumRows, Marca_Dim+3) = Art_Size2
> End If
> 
> If Sort_Fields Then
> objExcel.Cells(NumRows, Marca_Sort+1) = track.Grouping
> objExcel.Cells(NumRows, Marca_Sort+2) = track.SortArtist
> objExcel.Cells(NumRows, Marca_Sort+3) = track.SortAlbumArtist
> 'objExcel.Cells(NumRows, 14) = track.PlayedCount
> 'objExcel.Cells(NumRows, 15) = track.Skippedcount
> 'objExcel.Cells(NumRows, 16) = track.dateadded
> 'objExcel.Cells(NumRows, 17) = track.grouping
> End If
> 
> If (numrows - 100*(numrows\100)) = 0 Then WScript.Echo "Row. no: " & NumRows
> End If
> Next
> Next
> 
> ```
> 
> End If  
> Next
> 
> 'END OF THE SHEET EDITING, NOW SAVE THE FILE  
> 'SAVE FILE  
> objExcel.DisplayAlerts = False
> 
> Wscript.StdOut.Write "Output name (file will be saved to D:\iTunes\Excel\all.xls): "  
> result = WScript.StdIn.ReadLine  
> 'result = "xxx"  
> ' **SET THE FILE FOLDER HERE**  
> my\_sheet = "D:\iTunes\Excel"& result &".xlsx"  
> objWorkbook.SaveAs(my\_sheet)
> 
> 'objExcel.ActiveWorkbook.Save 'my\_sheet  
> objExcel.ActiveWorkbook.Close  
> objExcel.Quit

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [September 22, 2019, 4:28pm UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424/5 "2019-09-22T16:28:43Z")

</div>

oh, please  
MP3tag supports the display of cover dimensions since

[2018-04-09] NEW: added fields %\_cover\_width% and %\_cover\_height% for width and height of first embedded cover art. ([#41243](https://community.mp3tag.de/t/41243))

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [October 22, 2019, 4:28pm UTC](https://community.mp3tag.de/t/cover-image-dimensions/14424/6 "2019-10-22T16:28:48Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
