Get Image Position in Image Editor for drawing lines with bgl
So I solved this, it appears that the image editor is also like a 3d coordinate system. So I followed a tut for 3D and then just changed the view to SpaceImageEditor and instead of drawing on 'POST_PIXEL' I drew to 'POST_VIEW'.
Code:

def __init__(self):
    self.draw_handle = None
    self.draw_event = None

    self.widgets = []


def invoke(self, context, event):

    self.create_batch()

    args = (self, context)
    self.register_handlers(args, context)

    context.window_manager.modal_handler_add(self)
    return {'RUNNING_MODAL'}

def register_handlers(self, args, context):
    self.draw_handle = bpy.types.SpaceImageEditor.draw_handler_add(self.draw_callback, args,'WINDOW', 'POST_VIEW')

    self.draw_event = context.window_manager.event_timer_add(0.1, window=context.window)

def unregister_handlers(self, context):
    context.window_manager.event_timer_remove(self.draw_event)

    bpy.types.SpaceImageEditor.draw_handler_remove(self.draw_handle, 'WINDOW')

    self.draw_handle = None
    self.draw_event = None

def modal(self, context, event):
    if context.area:
        context.area.tag_redraw()

    if event.type in {'ESC'}:
        self.unregister_handlers(context)
        return {'CANCELLED'}

    return {'PASS_THROUGH'}

def finish(self):
    self.unregister_handlers(context)
    return {'FINISHED'}

def create_batch(self):

    vertices = [(0, 0.5, 0), (1, 0.5, 0)]

    self.shader = gpu.shader.from_builtin('3D_UNIFORM_COLOR')
    self.batch = batch_for_shader(self.shader, 'LINE_STRIP', {'pos': vertices})

def draw_callback(self, op, context):

    self.shader.bind()
    self.shader.uniform_float('color', (1,0,0,1))
    self.batch.draw(self.shader)