#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    C# Question: Images based on a variable


    So in my code I have a variable called gameName, I want an image that will basically be the cover art for the game. How do I go about doing this?

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Drawing;

    namespace Twitch_Roulette
    {
    class Game
    {
    private string gameName;
    private string developer;
    private string publisher;
    private string releaseDate;
    private string platform;
    private string genre;
    private int numPlayers;
    private string description;
    private Image boxArt;

    public Game()
    {
    gameName = "Void";
    developer = "Void";
    publisher = "Void";
    releaseDate = "Void";
    platform = "Void";
    genre = "Void";
    numPlayers = 1;
    description = "Void";
    }
    }
    }
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    187
    Rep Power
    83
    So in my code I have a variable called gameName, I want an image that will basically be the cover art for the game. How do I go about doing this?
    Maybe I'm missing something but I don't understand the question. I would suggest you provide a lot more detail as what exactly you're trying to do.

    Are you trying to implement a PictureBox to display various images or are you trying to develop a spash screen as an intro to your game.

    To reiterate, you have to provide a lot more info in order for everyone to understand your issue.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by BobS0327
    Maybe I'm missing something but I don't understand the question. I would suggest you provide a lot more detail as what exactly you're trying to do.

    Are you trying to implement a PictureBox to display various images or are you trying to develop a spash screen as an intro to your game.

    To reiterate, you have to provide a lot more info in order for everyone to understand your issue.
    Yeah sorry, I'm trying to display multiple images that correspond with a list. I got it to work eventually but the image quality was so low. I was told to possibly use Stream and Assembly?

    How do I make sure the quality of the image isn't changed? It was being converted to a bitmap.
  6. #4
  7. No Profile Picture
    Offensive Member
    Devshed Novice (500 - 999 posts)

    Join Date
    Oct 2002
    Location
    in the perfect world
    Posts
    622
    Rep Power
    28
    >>How do I make sure the quality of the image isn't changed? It was being converted to a bitmap

    Conversion to a bitmap does not mean a loss in quality.

    Maintaining quality depends on how you render the image and the properties of the image and display.

    As you provide no details on any of this it is impossible to help you.

    If I had to guess I would say you are changing the image size, probably to a non integer multiple of the original.
    The essence of Christianity is told us in the Garden of Eden history. The fruit that was forbidden was on the Tree of Knowledge. The subtext is, All the suffering you have is because you wanted to find out what was going on. You could be in the Garden of Eden if you had just kept your f***ing mouth shut and hadn't asked any questions.

    Frank Zappa

IMN logo majestic logo threadwatch logo seochat tools logo