Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6
System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64
User : User ( 0)
PHP Version : 7.4.6
Disable Function : NONE
Directory :  C:/xampp/perl/vendor/lib/Win32/Exe/Resource/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : C:/xampp/perl/vendor/lib/Win32/Exe/Resource/Icon.pm
# Copyright 2004 by Audrey Tang <cpan@audreyt.org>

package Win32::Exe::Resource::Icon;

use strict;
use base 'Win32::Exe::Resource';
use constant FORMAT => (
    Width       => 'C',
    Height      => 'C',
    ColorCount      => 'C',
    _           => 'C',
    Planes      => 'v',
    BitCount        => 'v',
    ImageSize       => 'V',
    I_RVA1      => 'v',
    I_RVA2      => 'v',
);

sub Id {
    my ($self) = @_;
    return $self->I_RVA1;
}

sub SetId {
    my ($self, $value) = @_;
    return $self->SetI_RVA1($value);
}

sub ImageOffset {
    my ($self) = @_;
    return $self->I_RVA1 + (($self->I_RVA2 || 0) * 65536);
}

sub SetImageOffset {
    my ($self, $value) = @_;
    $self->SetI_RVA1($value % 65536);
    $self->SetI_RVA2(int($value / 65536));
}

sub Data {
    my ($self) = @_;
    return $self->parent->substr($self->ImageOffset, $self->ImageSize);
}

sub dump {
    my ($self) = @_;
    my $parent = $self->parent;
    my $dump = $self->SUPER::dump;
    substr($dump, -2, 2, '') unless $parent->is_type('IconFile');
    return $dump;
}

1;