Cover image not scaling when releasing Inform 7 project

I’m having an issue where the website released with my Inform project is not scaling the cover image properly and it’s so large that it’s basically the background for the text. I also noticed that it’s not creating a scaled version of Cover.jpg (i.e., Small Cover.jpg is exactly the same size). I’ve set the size of the image to be 960x960 as suggested in Writing With Inform.

How do I fix this?

2 Likes

I’ve had the exact same problem, and the only way I found to fix it was creating my own smaller version of the cover, and saving it as “Small Cover” in the folder.

3 Likes

I modified the .css this way:


.coverimage
{
	width: 12.6em;
	margin-top: 2em;
	margin-left: 1em;
	float: left;
	clear: left;
	text-align: right;
	max-height: 120px;
	max-width: 120px;
} 

I tried to create the Small Cover.jpg, but the compiler copies the file Cover.jpg renaming it as Small Cover.jpg

Changing the .css solved the problem

After messing around with this a little bit I think what’s happening is there’s some bad css that has no visible effect; it’s not effective but it also doesn’t mess anything up so long as Small Cover.jpg is 120x120px. The selector for .coverimage isn’t having any effect on the image itself.

So there are two easy solutions:

  1. Modify the template html to add the .coverimage class to the <img> tag itself
  2. Modify the selector to target .coverimage img (in which case I didn’t need to change anything else).

Now I’m wondering where the code for scaling the image in the first place located?

1 Like

Thanks! I am also having this problem with Inform 10.1.2.xxxxxxx and was hoping there was a permanent fix somewhere, or that a bug-fix was coming.

I can scale my own small cover, which seems easier than editing the style.css every time I compile, but it is a bit inconvenient. But as copying a pre-scaled small cover into the release folder is easy, it’s not exactly a tragedy, but… is inconvenient.

Oh well, life is not always convenient, I guess.

Hopefully whoever is fixing bugs is aware and can make that change for a subsequent release.

(Though in the OP, I don’t know why anyone would want to fix such a gorgeous kitty! :slight_smile:

Sean.

2 Likes

The permanent fix is to go in and directly change the template :slight_smile:

That’s Rootbeer! He is perfect and ridiculous and also he says thanks for the kind words!

This is a known bug in 10.1: I7-2363.

4 Likes