Problem with blur fix (solved)

Discussion in 'Javascript/Plugin Support' started by Hyouryuu-Na, Aug 2, 2019.

  1. Hyouryuu-Na

    Hyouryuu-Na Poker-faced creepy girl Veteran

    Messages:
    302
    Likes Received:
    398
    Location:
    Lazyland!
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    I found this little code in the forums that fix the terrible blur problem:
    https://forums.rpgmakerweb.com/index.php?threads/how-to-remove-blur.47504/
    But it affects everything! The texts and pictures are all pixelated. Can someone tell me how to exclude pictures and system graphics from being affected? I can't seek help from that thread because it's really old and the one who provided this fix is inactive.
    Pasting the code below so you don't have to go find it:
    ImageManager.loadBitmap = function(folder, filename, hue, smooth) {
    if (filename) {
    var path = folder + encodeURIComponent(filename) + '.png';
    var bitmap = this.loadNormalBitmap(path, hue || 0);
    //console.log("disabling smoothing for "+path);
    bitmap.smooth = false; return bitmap;
    } else {
    return this.loadEmptyBitmap();
    }
    };
     
    Last edited: Aug 6, 2019
    #1
  2. Dreadshadow

    Dreadshadow Lv 38 Tech Magician Moderator

    Messages:
    3,835
    Likes Received:
    2,480
    First Language:
    Greek
    Primarily Uses:
    RMMV
    Strange. Very strange.

    if (filename) {
    var path = folder + encodeURIComponent(filename) + '.png';
    var bitmap = this.loadNormalBitmap(path, hue || 0);
    //console.log("disabling smoothing for "+path);
    bitmap.smooth = false; return bitmap;
    }


    is repeated identical twice. Why is that?

    I think this is an override to the WHOLE ImageManager.loadBitmap method.
    You can play with the names and string manipulation inside if (filename) { } to exclude the effect on specific filenames and instead do what the method does originally.You should find a way to exclude the text, I am not sure how, but for pictures you can name them PIC_0001. PIC_0002 etc etc, check if filename starts with "PIC_" and let ImageManager.loadBitmap do what it originally does in that case.

    That should had been done inside if (filename) { } and I don't know why it hasn't been done in this case. Thus I don't even count this as a solution if it does break so many stuff.
     
    #2
  3. Hyouryuu-Na

    Hyouryuu-Na Poker-faced creepy girl Veteran

    Messages:
    302
    Likes Received:
    398
    Location:
    Lazyland!
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    @Dreadshadow Oops! I copy pasted from my js file instead of searching in that thread. Maybe I fiddled around with it before but it doesn't matter because no matter what I do, it effects the whole things!

    I have no idea about javascript. There's no way I can set that up. But if you give me a template maybe I can play around with it?
     
    #3
  4. Dreadshadow

    Dreadshadow Lv 38 Tech Magician Moderator

    Messages:
    3,835
    Likes Received:
    2,480
    First Language:
    Greek
    Primarily Uses:
    RMMV
    Template. No don't bother tweaking code since it needs to take care of fonts too I guess. We need someone who knows how the initial method works, so they will know what and how to do it. I can not at this point and my time at this period is very limited. :/
     
    #4
  5. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,613
    Likes Received:
    10,514
    First Language:
    English
    Primarily Uses:
    RMVXA

    I've moved this thread to Javascript/Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

     
    #5
  6. Hyouryuu-Na

    Hyouryuu-Na Poker-faced creepy girl Veteran

    Messages:
    302
    Likes Received:
    398
    Location:
    Lazyland!
    First Language:
    Bangla
    Primarily Uses:
    RMMV
    I found the solution! The code is alright. No need to change that. Just don't make any changes in the index even though it's been told to do so in that thread. The images won't appear pixellated anymore.
    Thread can be closed now.
     
    #6

Share This Page