• Index
  •  » Bug reports
  •  » Images not showing in directory tree or adding to database.

#1 2016-03-20 11:14:01

Adornay
New member
Registered: 2016-03-20
Posts: 4

Images not showing in directory tree or adding to database.

Hi I'm new here, recently started using GCstar.

I'm using GCStar 1.6.1 on Windows 10.

After failing to build a new database to satisfaction I decided to reverse edit the Minicars database.
I've not touched the image sections with the exception of changing the descriptions.
I'm now at the stage where I'm inputting data, but when I try to upload pictures to any of the picture fields I come across a curious problem.
Some images will show up in the right hand pane and add to the database fine, but most of my images don't show up in the right hand pane, I still get the default minicars.png image and they won't add to the database.

At first I thought it might be a problem with image sizes, so I reduced them to the same size as ones that do work, to no avail.
I then thought it might be none alpha/numerical characters in the file names preventing it, so I renamed them using only letters & numbers, to no avail.
I've tried editing the pictures and saving them as different file extensions, PNG, JPG etc, to no avail.

Anyone got any bright ideas to cure my problem.

Last edited by Adornay (2016-03-20 11:18:20)

Offline

 

#2 2016-03-20 11:23:09

Adornay
New member
Registered: 2016-03-20
Posts: 4

Re: Images not showing in directory tree or adding to database.

Nevermind, found the solution.

It was down to none alpha/numeric characters issue after all.

Offline

 

#3 2016-03-20 11:47:15

Adornay
New member
Registered: 2016-03-20
Posts: 4

Re: Images not showing in directory tree or adding to database.

EasyRider wrote:

I've found a hack/patch/solution for the aforementioned problem of cover images with accented chars in their filename; since the end of the world according to the mayans in 2012 appears likely to happen before any official reply and/or fix for this matter comes forth, I'll try explain here how to bypass the problem for anybody else who might find it useful:
- locate the file GCUtils.pm under you installation folder
- open it with a text editor and locate the line "$displayedImage = $default if ! -f $displayedImage;" belonging to "sub getDisplayedImage"
- insert the line "utf8::decode($displayedImage);" (without the quotes) BEFORE that line.
- save & enjoy

Offline

 

#4 2016-03-20 11:53:46

Adornay
New member
Registered: 2016-03-20
Posts: 4

Re: Images not showing in directory tree or adding to database.

Although the above fix will bring the file up in the right hand pane when selecting an image, it still does not import them into the required field.

Offline

 

#5 2016-03-22 16:04:00

kerenoc
Member
Registered: 2016-03-19
Posts: 93

Re: Images not showing in directory tree or adding to database.

Hello,

In my context (Win7, France), the following change to the beginning of the getDiplayedImage function in GCUtils.pm worked. I don't know how to check in Perl  for the current encoding to make that portable.

Code:

sub getDisplayedImage
{
    my ($displayedImage, $default, $file, $fileDir) = @_;

    if ($^O =~ /win32/i)
    {
        # Adapt to the operating system's encoding (should be based on locale)

        my $targetEncoding = "iso-8859-1";
    
        $displayedImage = Encode::encode($targetEncoding, $displayedImage);
        $file = Encode::encode($targetEncoding, $file)     if ($file);
        $fileDir = Encode::encode($targetEncoding, $fileDir) if ($fileDir);
    }

Offline

 
  • Index
  •  » Bug reports
  •  » Images not showing in directory tree or adding to database.



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.