BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.88k stars 611 forks source link

Red UIImage while loading filter with image #258

Open GustasBr opened 6 years ago

GustasBr commented 6 years ago

So the problem is that sometimes UIImage becomes plain red or appears duplicates. How I could solve this problem? I'm using lookup filters.

P.S I'm compressing only the small images where user can pick the filters. I need the best quality UIImage for my main ImageView.

`let lookupFilter11 = LookupFilter()

    lookupFilter11.intensity = 1
        let pictureInput11 = PictureInput(image: original!)

    lookupFilter11.lookupImage = PictureInput(imageName: "lookup_amatorka.png") 

    let pictureOutput11 = PictureOutput()
    pictureOutput11.imageAvailableCallback = {image in
        self.image2 = image
        thumbnail = self.image2!.af_imageAspectScaled(toFill: size)
        self.imageView2.image = thumbnail
    }
    pictureInput11 --> lookupFilter11 --> pictureOutput11
    pictureInput11.processImage(synchronously:true)`

37588624_1970023056361446_5510715101176397824_n 37591186_1970023106361441_7102244412717006848_n

ghost commented 6 years ago

i too

yyjim commented 5 years ago

+1