Is there a way to read the value of a pixel from a PNG?

I'm currently working with data stored in encoded PNG files, where the value for each data point is stored in the RGB values of each pixel in the PNG, with the alpha channel specifying where there is no data. I am able to successfully translate the PNG to be displayed on the map, however, I want to know if there is a way for me to hover over a point and know which pixel of my data I am hovering over. My data is tiled in projection ESPG:4326, with a tilesize of 512x512. I am mainly looking for a function with similar functionality to Openlayers3's getPixelFromCoordinate function, which gives the pixel on the canvas which matches the lat/long on the current canvas.

Also, here is my code from Openlayers if this helps people understand what I'm trying to accomplish. The tile["values"] array holds values that have already been "translated" from RGB to a value.

/* Finds the value where the mouse currently is */
function findValue(layer, layer_name){
    var pixel = [mousePosition[0], mousePosition[1]];
    var coord = map.getCoordinateFromPixel(pixel);
    var tilegrid = layer.getSource().getTileGrid();
    var tileCoord = tilegrid.getTileCoordForCoordAndResolution(coord, map.getView().getResolution());
    var tile_extent = tilegrid.getTileCoordExtent(tileCoord);
    var tilePixel = map.getPixelFromCoordinate([tile_extent[0], tile_extent[3]]);
    var row = pixel[0] - tilePixel[0];
    var column = pixel[1] - Math.round(tilePixel[1]);
    var zoom = tilegrid.getZForResolution(map.getView().getResolution());
    var i = Math.round(column * tilegrid.getTileSize(zoom) + row);
    var tile;
    var x = tileCoord[1];
    var y = tileCoord[2];
    var z = tileCoord[0];
    var tile_array = layer_array[layer_name];
    for(j = 0; j < tile_array.length; j++){
        var coord = tile_array[j]["coord"];
        if(coord[0] == z && coord[1] == x && coord[2] == y){
            tile = tile_array[j];
            break;
        }
    }
    var value = tile["values"][i];
    if(value == tile["no_data_value"]){
        value = "N/A";
    }

    return value;
}